Open Form and Assign Value to Field (1 Viewer)

123dstreet

Registered User.
Local time
Today, 04:58
Joined
Apr 14, 2010
Messages
122
Hello all!

I am having a bit of a hard time with this:

I have a form (vp1) that is a continuous form based on a select query from multiple tables (TableA, TableB, TableC).

Now I have created TableD.

From form vp1, I need a button on each record that when pressed, opens a new sub form (vp2), when filled out, inserts data into TableD - this also works well.

Where I'm getting confused:

When I open form vp2 from form vp1, how can I automatically set the ID field in vp2 to equal the same ID field from the record in vp1?

Note: the ID field in vp2 is not a primary key.

Any help would be greatly appreciated! Thank you!
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:58
Joined
Aug 30, 2003
Messages
36,125
Try this type of thing:

DoCmd.OpenForm "vp2"
Forms!vp2.TextboxName = Me.TextboxName
 

Users who are viewing this thread

Top Bottom