Hey guys,
ive tried your comments but i still cant get it to work.
Ive made my form_current event on the main form a public sub and also tried to open the pop-up form in acDialog mode.
The control (actually a button's caption) on the main form only refreshes when i use my filter again (look up that specific record).
Ill explain more about what the feature on my form is :
I have a button called "Agenda" and when clicked opens up a pop-up form. User enters some values (date, time, topic, remarks) and upon clicking a button the code sets an Outlook reminder in its agenda.
When the Outlook reminder was set, the pop-up form closes.
The button's caption that was clicked to open the pop-up form should now be "Agenda (1)" to notify users that for the record on the main form an Outlook reminder was made.
And then when the reminder was set this code in my Form_Current's event should fire (but it doesnt)
Code:
Dim lngRed As Long
Dim lngBlack As Long
lngRed = RGB(255, 0, 0)
lngBlack = RGB(0, 0, 0)
If DLookup("DatumHerinnering", "tblObjecten3", "ObjectID = fldObjectID") >= Date Then
Me.knpHerinnering.Caption = "Agenda (1)"
Me.knpHerinnering.ForeColor = lngRed
Else
Me.knpHerinnering.Caption = "Agenda (0)"
Me.knpHerinnering.ForeColor = lngBlack
End If
When closing the pop-up form the "Agenda (0)" should be replaced by "Agenda (1)"