A
Adrian
Hi,
I'm no programmer, but am trying to add what seems to me to be a fairly
simple feature to a very simple database I have put together. On the click on
a button on a form, it calls a couple of reports to print an exam built up of
questions and the corresponding marking guide flagged by a user, then uses a
query to clear the flag and mark the current date in a "last used" field for
each question used. On clicking this button, I prompt the user for a title to
use on for the exam (called GBL_ExamText), and I am happily feeding that into
the reports, but what I can't seem to do is get this user value to update to
the database so I would have both the date any given question was used and
the exam name (as entered by the user) it was used for.
The SQL view of the query is:
UPDATE Data SET Data.UseInTest = No, Data.DateLastUsed = Now(),
Data.LastUsedComment = GBL_ExamText
WHERE (((Data.UseInTest)=Yes));
As it is, this prompts the user again for an entry for GBL_ExamTest, but the
value I want to add is in by this stage (as evidenced on the reports that are
produced) so clearly it's a case of the query not accessing the variable
correctly.
The other two updates work perfectly.
Anyone got any suggestions?!
Cheers
Adrian
I'm no programmer, but am trying to add what seems to me to be a fairly
simple feature to a very simple database I have put together. On the click on
a button on a form, it calls a couple of reports to print an exam built up of
questions and the corresponding marking guide flagged by a user, then uses a
query to clear the flag and mark the current date in a "last used" field for
each question used. On clicking this button, I prompt the user for a title to
use on for the exam (called GBL_ExamText), and I am happily feeding that into
the reports, but what I can't seem to do is get this user value to update to
the database so I would have both the date any given question was used and
the exam name (as entered by the user) it was used for.
The SQL view of the query is:
UPDATE Data SET Data.UseInTest = No, Data.DateLastUsed = Now(),
Data.LastUsedComment = GBL_ExamText
WHERE (((Data.UseInTest)=Yes));
As it is, this prompts the user again for an entry for GBL_ExamTest, but the
value I want to add is in by this stage (as evidenced on the reports that are
produced) so clearly it's a case of the query not accessing the variable
correctly.
The other two updates work perfectly.
Anyone got any suggestions?!
Cheers
Adrian