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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force Combo Box Value

Status
Not open for further replies.

dynamictiger

Technical User
Dec 14, 2001
206
AU
I have two forms that both have a combo box on them.

On clicking a button on form 1 I want to make form 1 invisible and force form 2 to drag the records across from form 1. For the most part I can get this to happen, except in the combo box for the client details.

I have tried various methods centreing around Me.Combobox.Column(1)=

Column(1) holds the ClientID field we are trying to update, I keep getting an object required error message.
 
Assuming that both form 1 & 2's ComboBox ControlSource & bound columns are the same:

Just set form 2's combo = 1's:
Me!Combobox = Form1!Combobox

Form 2's Combobox underlying bound column should force the proper display value to show in the combo box.

If #2's combo bound column is different than 1, then:
Me!Combobox = Form1!Combobox.Column(x)

where x is the column number - 1

Note: be sure to use Me!control for form controls and Me.property for form properties; Access may get confused.

Good Luck Jim Kraxberger
Spinning gold into straw...
 
CORRECTION!!!!

I goofed and gave you the wrong syntax for referencing another form from an existing form.

Forms("Form2")!Combobox = Me!Combobox

where Form2 represents the destination form Jim Kraxberger
Spinning gold into straw...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top