Populate a Combobox from another forms Textbox (1 Viewer)

Malcolm17

Member
Local time
Today, 00:34
Joined
Jun 11, 2018
Messages
107
Hello,

I'm trying to populate the first\default value of a Combo Box when I make a form visible with the value of a Textbox on another form. The Textbox value will be same as one of the 6 in the Combo Box. The Combo Box is just to allow the user to change the department and will be picked from a table.

Is this possible - I can't seem to make it happen.

The code I am using to copy to value from textbox to combobox is: (it works for textbox to textbox)

Code:
Forms!frmBackground!subfrmUserEmployee!cboDepartment = Forms!frmBackground!subfrmUsers!txtDepartment

Thank you,

Malcolm
 

Malcolm17

Member
Local time
Today, 00:34
Joined
Jun 11, 2018
Messages
107
Fabulous, I have been looking at it for hours - turned out to be an issue with the bound column.

Thank you, Malcolm
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:34
Joined
Aug 30, 2003
Messages
36,126
Happy to help!
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:34
Joined
Feb 19, 2002
Messages
43,302
The code will dirty the form and that is a problem. I would put it in the subform's BeforeInsert event. That way, it will only happen if the user starts to enter data.
 

Users who are viewing this thread

Top Bottom