View Full Version : Help on copying feild values


JagGa
08-31-2001, 10:49 AM
Hi there!
I have two forms open seperately, for different purpose and some information like address is in both forms. I want to display the same value of Address field(that user have entered recently) in first form into my second form. Is there a way to do that?
Please help!

-JagGa

jwindon
08-31-2001, 02:21 PM
If you just want to display the information, you can use DLookup.

Say if Form 1 is based off os tblNames-Addresses and Form 2 is based off of tblOrders....Both tables contain CustomerID

Form 2 controls would be:

CustomerID:
UnboundControl: Datasource written as

DLookup("[Address]","tblNames-Addresses", "[CustomerID] = [Forms]![Form 2]![CustomerID]")

You will need to add a DoCmd.RunCommand AcCmdRefresh after the entry of the Customer ID for the Dlookup to show any value.

Hope that stears you in the right direction.

R. Hicks
08-31-2001, 03:09 PM
If both forms are open then you only need to reference the form and control you want the info from.

Just choose the event you want to populate the information and use the example below as a sample:

Me.[Control_InForm2] = [Forms]![Form1]![Control_InForm1]

Change the names of the forms and controls to what you need.

HTH
RDH



[This message has been edited by R. Hicks (edited 08-31-2001).]