need notinlist to send more data

Milothicus

Registered User.
Local time
Today, 09:50
Joined
Sep 24, 2004
Messages
134
I'm using a notinlist function to add a contact on a form. each contact is associated with a client by selecting the client from a combo on the contact entry page.

when the contact name is being entered, the client is already selected on my form, and i want the combo on my contact entry page to automatically select the client. i would think the best way would be to pass the client info along through the openargs, but i'm not sure how to pass the data entered into the contact combo, and the value stored in the client combo.

is this possible?
 
The value entered into your contact combo is 'NewData'.
The value selected in your client combo box is me.cboClient if it is the bound column or me.cboClient.column(n) where n is the column you are after.. starting at column 0.

use something like:
Dim strOpenArg as string
strOpenArg = NewData & ";" me.cboClient.column(1)
DoCmd.OpenForm .............., strOpenArg

In your Contact form, parse the OpenArg string and extract the data.

Alternatively, you could store the variables in a public variable before opening the Contact form.

Hope this helps..
 

Users who are viewing this thread

Back
Top Bottom