passing data on forms

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
 
B

berk

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top