Show a saved record on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a form which has multiple command buttons and one text box.
I want the text box to return a value from an underlying table when the form opens. This value is used originally in a parameter query to update another table (so the value needs to appear when the form opens). The command buttons are clicked in sequence to perform a variety of tasks, the final command button finds a new value for the text box.

I therefore need the text box to initially return the current value of the record in the table and then for the user to overtype and hence update the value in the underlying table.
I cannot get the text box to show the underlying value on opening the form (it returns zero) and if a value is typed into the control it creates a new record.
I have tried using the GoToRecord method of the Do.Cmd object but I always get zero retuned. Can anyone help - many thanks
 
Check the form's Data Entry property. Be sure that it's set to No. When it's
set to Yes, the form opens at a new record; it won't let you see already
entered records.

--
Ken Snell
<MS ACCESS MVP>

Neal said:
i have a form which has multiple command buttons and one text box.
I want the text box to return a value from an underlying table when the
form opens. This value is used originally in a parameter query to update
another table (so the value needs to appear when the form opens). The
command buttons are clicked in sequence to perform a variety of tasks, the
final command button finds a new value for the text box.
I therefore need the text box to initially return the current value of the
record in the table and then for the user to overtype and hence update the
value in the underlying table.
I cannot get the text box to show the underlying value on opening the
form (it returns zero) and if a value is typed into the control it creates a
new record.
I have tried using the GoToRecord method of the Do.Cmd object but I always
get zero retuned. Can anyone help - many thanks
 
Back
Top