List Box value in to Combobox (1 Viewer)

Juolupuki

Registered User.
Local time
Today, 16:49
Joined
Jan 3, 2018
Messages
31
Hi,

I'm trying to make a form with list box some text box and combo box controls, where list box has records list. The combo box already have the row source from the table, so if i select the record in list box i want to see value in control box of the list box column.

I'm able to make for text boxes with code:
Code:
Forms!frm_Admin!frm_AdminSetUpData_Sub!frm_AddTeam.Form.txtbFirstName.VALUE = .Column(5)

but cant get for combo box, i have tried to use something like:
Code:
Forms!frm_Admin!frm_AdminSetUpData_Sub!frm_AddTeam.Form.cmbPosition.RowSource = .Column(3)
no luck...
Suggestions? Regards
 

Gasman

Enthusiastic Amateur
Local time
Today, 16:49
Joined
Sep 21, 2011
Messages
14,358
Try
Code:
Forms!frm_Admin!frm_AdminSetUpData_Sub!frm_AddTeam.Form.cmbPosition = .Column(3)
 

Juolupuki

Registered User.
Local time
Today, 16:49
Joined
Jan 3, 2018
Messages
31
:(
Run-time error '438':
Object doesn't support this property or method
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:49
Joined
May 7, 2009
Messages
19,247
Chk the rowsource of the combo. set the combo to same datatype as its bound column.
 

Minty

AWF VIP
Local time
Today, 16:49
Joined
Jul 26, 2013
Messages
10,371
Are you trying to make the combo value the same as the list box ?

I'm confused by the terminology being used here, perhaps a picture can paint at thousand words ??
 

Juolupuki

Registered User.
Local time
Today, 16:49
Joined
Jan 3, 2018
Messages
31
I have attached the the picture.
What i want to make, the form loads empty, if needs to add new record you have to fill the text boxes and combo boxes (they have data row source from other table, as you can see in the picture). In other cases if needs to update record you have to select from the list box and should populate in the fields above.
Like i mentioned the text boxes i have managed to do but combo boxes not giving me same result :(
Thanks
 

Attachments

  • AT.jpg
    AT.jpg
    98.9 KB · Views: 42

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:49
Joined
May 21, 2018
Messages
8,555
Are the controls at the top of the form just for filtering/querying the subform? If I pick SiteManger it returns all the site managers in the subform? If I pick last name of Smith it returns those with last name of Smith? Can you pick multiple controls, to return just SiteManagers named Smith or; SiteManger or Smith?
 

Juolupuki

Registered User.
Local time
Today, 16:49
Joined
Jan 3, 2018
Messages
31
Are the controls at the top of the form just for filtering/querying the subform? If I pick SiteManger it returns all the site managers in the subform? If I pick last name of Smith it returns those with last name of Smith? Can you pick multiple controls, to return just SiteManagers named Smith or; SiteManger or Smith?

Yes its for filtering the list box and can be opposite if i select from list box it will update each textbox value for selected record.
 

Juolupuki

Registered User.
Local time
Today, 16:49
Joined
Jan 3, 2018
Messages
31
Chk the rowsource of the combo. set the combo to same datatype as its bound column.

Thank you, for pointing the issue! I have managed to find where was different source. I think for now working :)

Will try to make all form's tabs with same setup
 

Users who are viewing this thread

Top Bottom