Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COPY INPUT FROM COMBO TO FILL-IN FORM

Status
Not open for further replies.

Angelique

Technical User
Mar 9, 2001
127
AU
When the user types in the combo box an item not in the list, it tiggers the Client form.

If the user types in a different client name to what was typed in the combo box, it retriggers the not in list error message.

Is there a way that I can copy the original string in the combo box into the new record on the Client form? This would save the user retyping and stop the error message.


Angelique
 
Yes, you can do this. In your NotInList event, I am assuming that you have code to open your Client form. When you open a form, it is possible to pass an argument to the newly opened form. Look at the OpenArg argument of the OpenForm method.

If you use something like this:

docmd.OpenForm "frmClient",,,,,,,Me!ValueofComboBox

(check the number of commas, I won't swear I got them right)

then in your frmClient, you can refer to the ValueOfComboBox using the OpenArgs Property of frmClient.

Hope this gets you started. Kathryn


 
Dear Kethryn

Thanks, I'll try that but one question in reference to the OpenArgs property of the frmClient? How do I do that?

Angelique
 
While you are in the frmClient, just refer to Me.OpenArgs

Look at the OpenArgs property in the Help Files.

Hope that helps. Post if you need more. Kathryn


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top