I have a Form1 that has a series of 10 checkboxes. That form is opened by a lead FormA where the user will have 3 control buttons to choose from. If One Certain control button on FormA is selected this Particular Form1 opens and hides the boxes 10, 9, 8 etc... down to the number of checkboxes required by a value that comes from FormA... That part is working fine.
Now the user selects the appropriate Checkboxes named CkBox1, CkBox2, 3, 4, 5, etc... to 10 but they can obviously only select from the Visible ones as explained above.
On that Form1 after selecting one, two, three or however many Checkboxes is appropriate I have a Control Button that Opens a Form2. When that Form2 opens one particular field needs to be checked for each of the corresponding Checkboxes that got selected on Form1
My inept attempt was CurrentDb.Execute but that adds records... I need to Edit records that are created during the execution of the FormA.
The Particular Form where I am having my error starts with frm_LVLReportingTypeSelect
with the control button selected there as "Lottery Clear Chip" which opens frm_ClearChipSelectMachine
The Code I attempted to alter instead of INSERT INTO to EDIT was (but as you know won't work)
Private Sub cmdSelectClearChipMachines_Click()
Dim t As Integer
t = 0
DoCmd.OpenForm "frm_ShiftReportingLVL", acNormal, , "RptgSeqID =" & txtNewSeqID
Forms!frm_ShiftReportingLVL.cboLVLRptgType = "Clear Chip"
Do Until t = Val(Me.txtLocNbrMachines)
CurrentDb.Execute "EDIT ShiftReportingLVL(MachineClearChipped) VALUES (Yes), WHERE ShiftReportingLVL (RptgSeqID, LVLPositionNbr) =(" & Me.txtNewSeqID & "," & t & ")", dbFailOnError
t = t + 1
DoCmd.Close acForm, "frm_LVLREportingTypeSelect", acSaveNo
I have attached the stripped down db just in case