Updating fields via code not updating table

Gavx

Registered User.
Local time
Tomorrow, 07:28
Joined
Mar 8, 2014
Messages
155
I have a form that has combo boxes and text fields (as well as sub forms). There is also a button linked to some code that says'

Private Sub cmdQuote_Click()
'Creates quote date and prints quote
Me.QuoteDate = Now()
Me.cbAgentID.Requery
DoCmd.OpenReport "Quote", acViewPreview, , "BookingID = " & Me.BookingID
End Sub

When the button is pressed the QuoteDate field (it is bound) should be be populated, but unfortunately it is not.

I have played with refresh and requery but cannot derive a solution.
What am I doing wrong?
thanks
 
There is nothing in your code to trigger a save. Save the record explicitly:

Me.Dirty=False
 

Users who are viewing this thread

Back
Top Bottom