Update table from unbound form text field

nick1408

Registered User.
Local time
Today, 19:34
Joined
Jun 16, 2016
Messages
77
Hopefully a nice, easy one:

Code:
Private Sub Toggle183_Click()
Do.Cmd.OpenTable ("Baseline")
Do.Cmd.GoToRecord actable, "Baseline", acNewRec
Table![Baseline]![Select Baseline Month] = Forms![Baseline Hours]!newRecordName
DoCmd.Close actable, "Baseline', acSaveYes
Me.newRecordName = ""
End Sub

The line Table![Baseline]![Select Baseline Month] = Forms![Baseline Hours]!newRecordName is not doing what I want it to do - put the contents of newRecordName into [Select Baseline Month]. Besides that, this sub works fine. Where have I gone wrong?
 
Use an update query instead of that line.

I'd also suggest you avoid having spaces in table fields or form names. In fact avoid completely

Colin
 

Users who are viewing this thread

Back
Top Bottom