If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Missing check mark
Hello - I have a check box that triggers an Event Procedure to save the
record and close the form, report, database and Access itself. The Procedure is working perfectly now (thank you for help received here!) but the check mark is not recording when the box is clicked. It doesn't show either in the source table, or on the printed report. It DID show, back when the Procedure didn't work. Any suggestions on what I could have done to stop the check mark from recording? (I've tried to put Properties back where they were after experimenting, but I could easily have missed one - or two - or... ) All suggestions gratefully received - Thank you in advance. -- Beth McCalley |
#2
|
|||
|
|||
Missing check mark
On Wed, 18 Jun 2008 18:40:02 -0700, BethMc wrote:
Hello - I have a check box that triggers an Event Procedure to save the record and close the form, report, database and Access itself. The Procedure is working perfectly now (thank you for help received here!) but the check mark is not recording when the box is clicked. It doesn't show either in the source table, or on the printed report. It DID show, back when the Procedure didn't work. Any suggestions on what I could have done to stop the check mark from recording? (I've tried to put Properties back where they were after experimenting, but I could easily have missed one - or two - or... ) All suggestions gratefully received - Thank you in advance. I would suspect that the check control is NOT BOUND to a table field. Check the control source. If you wish it to show up in your table or on your report, it should not be empty. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#3
|
|||
|
|||
Missing check mark
Is the checkbox also meant to record some other logical data that is
part of the record, or is it just used to save the record and close the app? If the former, check the control source of the check box. If the latter, then I see no reason to have it's value saved. -- _________ Sean Bailey "BethMc" wrote: Hello - I have a check box that triggers an Event Procedure to save the record and close the form, report, database and Access itself. The Procedure is working perfectly now (thank you for help received here!) but the check mark is not recording when the box is clicked. It doesn't show either in the source table, or on the printed report. It DID show, back when the Procedure didn't work. Any suggestions on what I could have done to stop the check mark from recording? (I've tried to put Properties back where they were after experimenting, but I could easily have missed one - or two - or... ) All suggestions gratefully received - Thank you in advance. -- Beth McCalley |
#4
|
|||
|
|||
Missing check mark
Yes, the checkbox records that the rental customer did mark the box labeled
"I agree to all the above terms and conditions" - I do need it to show. And, the Control Source is still set to the field (field name: I Agree), which recorded check marks just fine until two days ago. Here's my Event Procedure - the idea is that the rental contract doesn't print until the customer confirms agreement to all terms. Private Sub Check126_Click() DoCmd.RunCommand acCmdSaveRecord ' Print current record DoCmd.OpenReport "Jeep Rental Agreement Report", acViewNormal, "", "[Guest ID]=[Forms]![Jeep Rental Agreement 2]![Guest ID]", acDialog ' Close report DoCmd.Close acReport, "Jeep Rental Agreement Report" ' Save record and close form DoCmd.Close acForm, "Jeep Rental Agreement 2" DoCmd.Quit End Sub Do you see anything here that could be preventing the check mark from recording? Thank you very much for taking a look - -- Beth McCalley "Beetle" wrote: Is the checkbox also meant to record some other logical data that is part of the record, or is it just used to save the record and close the app? If the former, check the control source of the check box. If the latter, then I see no reason to have it's value saved. -- _________ Sean Bailey "BethMc" wrote: Hello - I have a check box that triggers an Event Procedure to save the record and close the form, report, database and Access itself. The Procedure is working perfectly now (thank you for help received here!) but the check mark is not recording when the box is clicked. It doesn't show either in the source table, or on the printed report. It DID show, back when the Procedure didn't work. Any suggestions on what I could have done to stop the check mark from recording? (I've tried to put Properties back where they were after experimenting, but I could easily have missed one - or two - or... ) All suggestions gratefully received - Thank you in advance. -- Beth McCalley |
#5
|
|||
|
|||
Missing check mark
Please see the reply to Beetle, above - the control is bound to its field,
and I do need it to print. Sudden thought - since I ended up using an Event Procedure (VBA) rather than a macro, could the fact that the Source field has a space in it be causing a problem? I saw somewhere that VBA doesn't like spaces. Thank you for anything you can tell me. -- Beth McCalley "fredg" wrote: On Wed, 18 Jun 2008 18:40:02 -0700, BethMc wrote: Hello - I have a check box that triggers an Event Procedure to save the record and close the form, report, database and Access itself. The Procedure is working perfectly now (thank you for help received here!) but the check mark is not recording when the box is clicked. It doesn't show either in the source table, or on the printed report. It DID show, back when the Procedure didn't work. Any suggestions on what I could have done to stop the check mark from recording? (I've tried to put Properties back where they were after experimenting, but I could easily have missed one - or two - or... ) All suggestions gratefully received - Thank you in advance. I would suspect that the check control is NOT BOUND to a table field. Check the control source. If you wish it to show up in your table or on your report, it should not be empty. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#6
|
|||
|
|||
Missing check mark
hmmmmm. Nothing stands out as to why the check box value would not be
saved. If you make changes to other fields in the record, are those changes saved? The only thing that looks odd in your code is the criteria string for the report. normally it would be; "[Guest ID]=" & [Forms]![Jeep Rental Agreement 2]![Guest ID] instead of the whole line being within the quotes as you have it, but that's got nothing to do with the record being saved or not. Fred is more knowledgeable than I am, so maybe he will see something I'm missing. -- _________ Sean Bailey "BethMc" wrote: Yes, the checkbox records that the rental customer did mark the box labeled "I agree to all the above terms and conditions" - I do need it to show. And, the Control Source is still set to the field (field name: I Agree), which recorded check marks just fine until two days ago. Here's my Event Procedure - the idea is that the rental contract doesn't print until the customer confirms agreement to all terms. Private Sub Check126_Click() DoCmd.RunCommand acCmdSaveRecord ' Print current record DoCmd.OpenReport "Jeep Rental Agreement Report", acViewNormal, "", "[Guest ID]=[Forms]![Jeep Rental Agreement 2]![Guest ID]", acDialog ' Close report DoCmd.Close acReport, "Jeep Rental Agreement Report" ' Save record and close form DoCmd.Close acForm, "Jeep Rental Agreement 2" DoCmd.Quit End Sub Do you see anything here that could be preventing the check mark from recording? Thank you very much for taking a look - -- Beth McCalley "Beetle" wrote: Is the checkbox also meant to record some other logical data that is part of the record, or is it just used to save the record and close the app? If the former, check the control source of the check box. If the latter, then I see no reason to have it's value saved. -- _________ Sean Bailey "BethMc" wrote: Hello - I have a check box that triggers an Event Procedure to save the record and close the form, report, database and Access itself. The Procedure is working perfectly now (thank you for help received here!) but the check mark is not recording when the box is clicked. It doesn't show either in the source table, or on the printed report. It DID show, back when the Procedure didn't work. Any suggestions on what I could have done to stop the check mark from recording? (I've tried to put Properties back where they were after experimenting, but I could easily have missed one - or two - or... ) All suggestions gratefully received - Thank you in advance. -- Beth McCalley |
#7
|
|||
|
|||
Missing check mark
Beth,
I tried out your code and it works (sort of). The DoCmd command errored out due the the acDialog parameter at the end (which is not required) and, as Beetle pointed out, the criteria format is incorrect. Also you don't need the second and third parameters (although it would not give you the problem you are having) as these are the default values. The only other problem I see is that if the user should click on a CheckBox that is already checked, the report will still be printed but with the box unchecked. Perhaps you could try something like this - Private Sub Check126_Click() DoCmd.RunCommand acCmdSaveRecord If Check126 = True Then ' Print current record DoCmd.OpenReport "Jeep Rental Agreement Report", , , "[Guest ID]= " & [Forms]![Jeep Rental Agreement 2]![Guest ID] ' Close report DoCmd.Close acReport, "Jeep Rental Agreement Report" ' Save record and close form DoCmd.Close acForm, "Jeep Rental Agreement 2" DoCmd.Quit EndIf End Sub Note that the DoCmd line and the criteria part is all on the same line. Personally I think you would be better using a button control to print the report and only print the report if the check box is ticked, it would give more control over what happens. HTH Peter Hibbs. On Wed, 18 Jun 2008 20:38:02 -0700, BethMc wrote: Yes, the checkbox records that the rental customer did mark the box labeled "I agree to all the above terms and conditions" - I do need it to show. And, the Control Source is still set to the field (field name: I Agree), which recorded check marks just fine until two days ago. Here's my Event Procedure - the idea is that the rental contract doesn't print until the customer confirms agreement to all terms. Private Sub Check126_Click() DoCmd.RunCommand acCmdSaveRecord ' Print current record DoCmd.OpenReport "Jeep Rental Agreement Report", acViewNormal, "", "[Guest ID]=[Forms]![Jeep Rental Agreement 2]![Guest ID]", acDialog ' Close report DoCmd.Close acReport, "Jeep Rental Agreement Report" ' Save record and close form DoCmd.Close acForm, "Jeep Rental Agreement 2" DoCmd.Quit End Sub Do you see anything here that could be preventing the check mark from recording? Thank you very much for taking a look - |
Thread Tools | |
Display Modes | |
|
|