how to pass value from one FORM to another FORM

malikge

Registered User.
Local time
Today, 13:31
Joined
Feb 23, 2012
Messages
30
Hi,
I have a form on which I have to enter a message number and date,
after that on the same form I have placed a button which opens another form.
On second form I have placed a drop down which shows the message numbers entered in the first form.

But when I go from first form to second form, in the drop down it shows all the message numbers but didn't show the last message number entered.

after closing the forms and again opening it, shows the last entered value.

Is it possible to pass the message number onto the next form, without closing and reopening it.
 
Try this:
On the second form OnOpen event (or OnLoad event) put the code:

Me.ComboBoxName.Requery
 
In second form's OnLoad and OnOpen event I have placed:

OnLoad:
Private Sub Form_Load()
Me.messageNo.Requery
End Sub

OnOpen:
Private Sub Form_Open(Cancel As Integer)
Me.messageNo.Requery
End Sub

but still nothing happened.
If I close the first form and refresh the second form then it shows the last entered message number.
 
Try this:
On first form OnClick (command button) event put this code:

DoCmd.RunCommand acCmdSaveRecord
 

Users who are viewing this thread

Back
Top Bottom