Question With Retrieving data from table

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hi everyone,

Thanks for all the help with my previous question. Now I
have another question? How do I retrieve records from the
tables and display them appropriately to the text boxes in
my form by using codes?

Example:

Company Name:______
Company Address:
....

I have these two text boxes in my form. The text boxes
will be fill up with information retrieved from the
company table. What kind of codes Do I use to retrieve the
records and fill the informaiton to the right text boxes?
I'm want to learn programming too, but I'm new to VB, so
can any help me out. Thanks.

James
 
If your form is based on your TblCompany table, just pull down the two fields
into your form from the field list and you got what you want. If your form is
based on an unrelated table, use this expression in the control source property
of a textbox:

=DLookup("[CompanyName]","TblCompany")

same for company address.
 
Back
Top