R
rocketD
Hello,
I have an option group with two options. For one option (called
signin), I have the option value set at 1, and for the other (called
visit), the value is -1. I want to pass the value of the signin
option (1) to a numeric field called "numSignIns" if that option is
selected, and the value of the visit option (-1) to a yes/no field
called "visit" if it is selected. Whatever option is NOT selected I'm
assuming will not have any value passed, which is fine. I have the
following SQL set up to add a record at the press of a button, and for
the other fields in the code it works, but the values from the option
buttons are not passed no matter which option is selected.
DoCmd.RunSQL "INSERT INTO tblClinicTrain(PEARID, ClinicID, startDate,
numSignIns, Visit)" & _
"VALUES(forms.fmParticipantRecords.PEARID,
forms.fmParticipantRecords.ClinicID," & _
"forms.fmParticipantRecords.clinicStartDate,
forms.fmParticipantRecords.signin," & _
"forms.fmParticipantRecords.visit);"
Can someone please explain where I'm going wrong, or if there's a
better way to do this?
Thanks,
Dara
I have an option group with two options. For one option (called
signin), I have the option value set at 1, and for the other (called
visit), the value is -1. I want to pass the value of the signin
option (1) to a numeric field called "numSignIns" if that option is
selected, and the value of the visit option (-1) to a yes/no field
called "visit" if it is selected. Whatever option is NOT selected I'm
assuming will not have any value passed, which is fine. I have the
following SQL set up to add a record at the press of a button, and for
the other fields in the code it works, but the values from the option
buttons are not passed no matter which option is selected.
DoCmd.RunSQL "INSERT INTO tblClinicTrain(PEARID, ClinicID, startDate,
numSignIns, Visit)" & _
"VALUES(forms.fmParticipantRecords.PEARID,
forms.fmParticipantRecords.ClinicID," & _
"forms.fmParticipantRecords.clinicStartDate,
forms.fmParticipantRecords.signin," & _
"forms.fmParticipantRecords.visit);"
Can someone please explain where I'm going wrong, or if there's a
better way to do this?
Thanks,
Dara