O
OTWarrior via AccessMonster.com
I have some code elsewhere on my db that i use to export some values from one
table into one that isn't loaded on the form, and I need to do a similar
technique elsewhere. However, I need to export the value of a checkbox on the
form, to the related "nBookingID" checkbox in the table.
this is the working code for adding a new booking and entering in the
nDayBookingID for future reference
If Check135.Value = -1 And DCount("*", "tbl_TRA_DAYComplete", "[nDayBookingID]
=" & Me.anDayBookingID) = 0 Then
sql = ""
sql = sql & "INSERT INTO tbl_TRA_DAYComplete (nDayBookingID) "
sql = sql & "SELECT '" & Me.anDayBookingID & "';"
DoCmd.RunSQL (sql)
End If
This is what I have so far.....
sql = ""
sql = sql & "INSERT INTO tbl_TRA_DAYComplete (boolTRAComplete) "
sql = sql & "SELECT '" & Me.boolComplete & "';"
DoCmd.RunSQL (sql)
This only seems to add a new record to the table with whatever the value of
the checkbox is. I know that It is not referencing the nDayBookingID or the
the autonumber on the table (tbl_TRA_DAYComplete), but how would i go about
doing so?
table into one that isn't loaded on the form, and I need to do a similar
technique elsewhere. However, I need to export the value of a checkbox on the
form, to the related "nBookingID" checkbox in the table.
this is the working code for adding a new booking and entering in the
nDayBookingID for future reference
If Check135.Value = -1 And DCount("*", "tbl_TRA_DAYComplete", "[nDayBookingID]
=" & Me.anDayBookingID) = 0 Then
sql = ""
sql = sql & "INSERT INTO tbl_TRA_DAYComplete (nDayBookingID) "
sql = sql & "SELECT '" & Me.anDayBookingID & "';"
DoCmd.RunSQL (sql)
End If
This is what I have so far.....
sql = ""
sql = sql & "INSERT INTO tbl_TRA_DAYComplete (boolTRAComplete) "
sql = sql & "SELECT '" & Me.boolComplete & "';"
DoCmd.RunSQL (sql)
This only seems to add a new record to the table with whatever the value of
the checkbox is. I know that It is not referencing the nDayBookingID or the
the autonumber on the table (tbl_TRA_DAYComplete), but how would i go about
doing so?