E
Emelina Bumsquash
I want to alter a checkbox from FALSE to TRUE based on the selection given in
a combo box. The combo box and checkbox are in different tables related by
the primary key (study number).
In the coding for the databse, there are currently SQL commands which insert
dates into target fields afterupdate of a 'date of randomisation' in a
separate table. One of them is coded something like the below:
SQL = "INSERT INTO TableA(Date1) VALUES ('" & DateOfRandomisation.Value + 30
& "') "
DoCmd.RunSQL SQL
SQL = "UPDATE TableA SET Date1 = '" & DateOfRandomisation.Value + 30 & "'
WHERE StudyNumber = "'"
DoCmd.RunSQL SQL
I didn't design this database or write this coding and I'm not particularly
expert but I think I should be able to copy the format of the coding above to
get, say the checkbox in TableA to be 'True' after update of a combo box.
However, I only want the checkbox value to turn to 'true' conditional upon
the particular choice made in that combo box i.e. if the combo box value is
2, THEN make the checkbox True rather than just indiscriminantly turning it
true.
any ideas? as i say i'm not an expert so plain english please! many thanks
for any help.
a combo box. The combo box and checkbox are in different tables related by
the primary key (study number).
In the coding for the databse, there are currently SQL commands which insert
dates into target fields afterupdate of a 'date of randomisation' in a
separate table. One of them is coded something like the below:
SQL = "INSERT INTO TableA(Date1) VALUES ('" & DateOfRandomisation.Value + 30
& "') "
DoCmd.RunSQL SQL
SQL = "UPDATE TableA SET Date1 = '" & DateOfRandomisation.Value + 30 & "'
WHERE StudyNumber = "'"
DoCmd.RunSQL SQL
I didn't design this database or write this coding and I'm not particularly
expert but I think I should be able to copy the format of the coding above to
get, say the checkbox in TableA to be 'True' after update of a combo box.
However, I only want the checkbox value to turn to 'true' conditional upon
the particular choice made in that combo box i.e. if the combo box value is
2, THEN make the checkbox True rather than just indiscriminantly turning it
true.
any ideas? as i say i'm not an expert so plain english please! many thanks
for any help.