On Open Change Field

Jaro19a

Registered User.
Local time
Today, 08:11
Joined
Apr 6, 2003
Messages
16
I'm ok with access but I need to do something that is above my level. I'm not sure if it can be done with a ON OPEN, a MACRO, or in CODE. I'm hoping some one can help me. This is what I need .....

When form A opens I need it to change a combo box from C (curent data) to D (new data). Can some one please help me.

Thank you,
Jeremy C.
 
On the form's Load() event, put a small bit of code:

Me.cboYourCombo.RowSource = ""

Within the "" put an SQL statement to select the relevant records for your combo.
 
On the form's Load() event, I put:

Me.cboStatus.RowSource = "In"

It still does not seem to work. Did I do something wrong. I think I might need to change the ME to somthing but not sure what.
 
No, Me is fine as ME is the current form - what you need to change is "IN" as this means nothing.

Your RowSource should be an SQL statement like:

"SELECT [MyColumn] FROM [MyTable];"
 
Below is what I have put in the code for the Form On Load, but where do I tell it what I want it to change to. Thank you for all your help. Jeremy.

Private Sub Form_Load()

Me.cboStatus.RowSource = "SELECT [Status] FROM [Tab_People];"

End Sub
 
Still do not know where I tell it want I want it to be. Can some one help me. Thank you.

---------------
Private Sub Form_Load()

Me.cboStatus.RowSource = "SELECT [Status] FROM [Tab_People];"

End Sub
 

Users who are viewing this thread

Back
Top Bottom