Connecting Tech Pros Worldwide Forums | Help | Site Map

Problem with recognizing my last checkbox

Newbie
 
Join Date: Sep 2009
Posts: 3
#1: Sep 3 '09
I am not good with the Sql or code writing.

I have a form in Access 2007,
I created a checkbox by each dynamic row so the user can select the "row" he wants to print.
Everything seems to work fine but the last checkbox "selected" regardless of which row is not seen.

Only by having the user "tab" or place curser on a different section of the form, will the last selected checkbox show on the report.

How can I have the selections recognized with any additional steps?
Thank You for your assistance
Pete

Megalog's Avatar
Expert
 
Join Date: Sep 2007
Posts: 273
#2: Sep 3 '09

re: Problem with recognizing my last checkbox


Greets Pete,

Your post is missing loads of information, so I'm going to presume as much as I can here...

You speak of a form then a report.. So the checkboxes are what you are filtering for in your report? (Only those records selected on the forms show up in the report?)

Are they launching this report off a button on the form? If this is the case, it sounds like maybe that record isnt being saved first, and we'll need to adjust your process slightly to ensure the data is saved before the report is opened.

Before we go any further, please clarify what steps are being taken exactly.
Newbie
 
Join Date: Sep 2009
Posts: 3
#3: Sep 3 '09

re: Problem with recognizing my last checkbox


My apologies Megalog, for the limited information
I am working off a form, is not saved, the user selects the “boxes” he wants as filtering for the report.
After he selects his choices off the form, he then “hits” the print preview (command ) button that I have placed on the form.
From there the filtered results show up on the Report page for viewing, saving or printing.
We can see all the filtered selections but the last one, unless I select or click on a different area of the form, AFTER this, then we CAN see the last selection on our Report Preview.
Hope this is a bit better explanation?
Thank you for your assistance…
Pete
FishVal's Avatar
Expert
 
Join Date: Jun 2007
Location: Israel
Posts: 2,584
#4: Sep 3 '09

re: Problem with recognizing my last checkbox


Pete. The reason for it is that the last record is not yet saved to the bound table.
You could force the record to be saved by setting form's "Dirty" property to False on button click.
Newbie
 
Join Date: Sep 2009
Posts: 3
#5: Sep 3 '09

re: Problem with recognizing my last checkbox


Thank You for your response FishVal.
I went to the section you mentioned but it requires a code sequence, which since I am new at this, I do not know what to place here?
Or am I missing something from your response?
Thank You
Pete
FishVal's Avatar
Expert
 
Join Date: Jun 2007
Location: Israel
Posts: 2,584
#6: Sep 3 '09

re: Problem with recognizing my last checkbox


I guess you may place
Me.Dirty=False
directly before any other code in your button click event handling subroutine.
Reply