passing data on forms

  • Thread starter Thread starter doug
  • Start date Start date
D

doug

i have a database where i am making two forms. the first
form is a "logon" form where user enters an id. this id
is then passed to the second form. Based on that id, on
the second form i want to populate a three fields
(name,section,date) that are in the same record as the id,
i can pass the field from one form to another but cant get
it to reference the table to lookup the other data. How
do i do that?

thanks
 
if the id is of type number (any type) do this on the
first form (after the button is pressed to open form2

forms!form2!txtname = dlookup("name","table1","id =" &
me.id)

this assumes the field on form two that will contain the
name is called txtname and the table that holds all 4
fields is called table1. Change them as needed. Look up
help for Dlookup and it should explain everything. Then
you can do the same for the other two fields.
 
Back
Top