reference a value on a form from another form

ivonsurf123

Registered User.
Local time
Today, 04:19
Joined
Dec 8, 2017
Messages
69
Hello,

I am trying to pass a value from one form (comboBox) to another form (ComboBox) where the value is on frm_BankHolidays and the combobox that I need to add that value from the other form is Based, the form name is frm_Register_New_Employee. I am not sure if I am using a wrong reference and /or the wrong event as well. Please help.


Code:
Private Sub Form_Load()
     Me.Based.RowSource = [Forms]![frm_BankHolidays]![cboCountry].[RecordSource]
   
End Sub
 
What I want to do is everytime I enter a new value in cboCountry to also add it in the other field Based that is in the other form.
 
Based is a ComboBox from the form that I want to add the value that I enter in the other ComboBox cboCountry which is in frm_BankHolidays
 
Last edited:
Sorry Just realize that Combobox Based is under a navigation Form as well
 
Agree with everyone. What is unclear is if a user selects
"Germany" in cboCountry on frm_BankHoliday do you want to set the value of combobox "Based" to "Germany" or do you want to add it as a selection to the row source of combobox Based.

FYI. Forms have recordsources combos and listboxes have rowsources.
 
Hello Everyone,

Just figure our how to do it, just silly of me, I was complicated myself, sorry about that, all I just need to do is to reference the table BankHolidays in the property sheet (Data = Row Source) of the New Employee form and that was it. Thank you for all your help.
 

Users who are viewing this thread

Back
Top Bottom