code query to update textbox and table

P

PRAV

hi, how to run a query in my form_load (ms access 97) so it set the
value of the query to a textbox (txtinfo) and put the value in my
tblInfo table. My query is Select count(project) from tblproject;
 
B

Barry Gilbert

Instead of Select Count, you could use DCount("project","tblProject") as the
default value for the textbox.

Is the txtInfo textbox bound to a field in the tblInfo table? If so, it will
automatically save the value.

Barry
 
P

PRAV

But how can i get the data from a listbox (lstPercent) to display in a
textbox (txtPercent) on the same from. I will hide the listbox.
 
Top