Populate Text box with query result

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

Guest

I have a form that has a textbox on it. I would like to populate the textbox with the result of a query(which will always be 1 number) on the "On Open" event but can't seem to get it to work

Any ideas are greatly appreciated.....
 
Gregory said:
I have a form that has a textbox on it. I would like to populate the
textbox with the result of a query(which will always be 1 number) on the
"On Open" event but can't seem to get it to work.
Any ideas are greatly appreciated.....

Unless it is a ComboBox or ListBox you can't display the results of a query
directly in a control. You can use a DLookup() function against the query
or you can create a custom function to read a RecordSet based on the query
and return the value.
 
Back
Top