update yes/no and headers questions

  • Thread starter Thread starter Josh
  • Start date Start date
J

Josh

I'm trying to print Purchase Orders as a 'batch'. The report is based on a
query which looks to yes/no fields: [ClosedOut] =yes & [Printed] =no.

First question, reference page/report headers. I can't have the CompanyName,
logo, etc on the report header, because then it only prints once on multiple
PO's. I can have it on page header, which works fine - except, it takes up a lot
of room, and would rather not repeat it for later pages of the same PO. Not a
big worry, I can do that if necessary, just wondering if I'm missing something
obvious.

Second question, reference updating the [Printed] from No to Yes after the
print job. I can have an update query that will update, but I want to have some
sort of msgbox probably that will ask 'did it print ok, are you ready to update
now?". But when I tried that, it did the update even while the msgbox was
active.

Also, I'd like to do the update in code rather than an update query, but I could
never get it to work, I could get code working using text or numbers, but not a
yes/no field. Of course, I've deleted that form now, so can't show code.

I'm unsure on something else, this is being printed as a batch because its being
printed to a remote printer. Maybe I need another field, some shortened version
of: [HaveYouVisuallyCheckedPrintJobsAndTheyAreAllOK] ....since I won't
necessarily know if they printed ok, until I visually inspect them. ???

Any help is appreciated, Josh
 
comments inline.

Josh said:
I'm trying to print Purchase Orders as a 'batch'. The report is based on a
query which looks to yes/no fields: [ClosedOut] =yes & [Printed] =no.

First question, reference page/report headers. I can't have the CompanyName,
logo, etc on the report header, because then it only prints once on multiple
PO's. I can have it on page header, which works fine - except, it takes up a lot
of room, and would rather not repeat it for later pages of the same PO. Not a
big worry, I can do that if necessary, just wondering if I'm missing something
obvious.

put the header text in the PO header section, rather than the page header
section.
Second question, reference updating the [Printed] from No to Yes after the
print job. I can have an update query that will update, but I want to have some
sort of msgbox probably that will ask 'did it print ok, are you ready to update
now?". But when I tried that, it did the update even while the msgbox was
active.

can't troubleshoot your code without seeing it, but something along the
following lines should work, as

If Msgbox("Do you want to mark these " _
& "records as printed?", vbYesNo) = vbYes Then
CurrentDb.Execute "UpdateQueryName", dbFailOnError
End If
Also, I'd like to do the update in code rather than an update query, but I could
never get it to work, I could get code working using text or numbers, but not a
yes/no field. Of course, I've deleted that form now, so can't show code.

why do you want to update a recordset rather than run an Update query?
AFAIK, there's no advantage to looping through a recordset rather than using
an action query, and writing the code to do the loop takes a lot more work
than a single line of code to run the query.
I'm unsure on something else, this is being printed as a batch because its being
printed to a remote printer. Maybe I need another field, some shortened version
of: [HaveYouVisuallyCheckedPrintJobsAndTheyAreAllOK] ....since I won't
necessarily know if they printed ok, until I visually inspect them. ???

depends on when you want to update the records, as opposed to when you plan
to inspect the prints. the If statement noted above will effectively pause
when the message box pops up, until you answer the question. how and when
you call the code is at your discretion; you need to figure out the process
that you (or the end user) will go through, then decide on how to set up the
user interface to best support that process.

hth
 
comments inline.

put the header text in the PO header section, rather than the page header
section.

and a page break in group footer I assume? ok
Second question, reference updating the [Printed] from No to Yes after the

can't troubleshoot your code without seeing it, but something along the
following lines should work, as

If Msgbox("Do you want to mark these " _
& "records as printed?", vbYesNo) = vbYes Then
CurrentDb.Execute "UpdateQueryName", dbFailOnError
End If

I think I was trying to (in effect) run query, pause, then bring up the msgbox.
Don't know what I was thinking said:
why do you want to update a recordset rather than run an Update query?
AFAIK, there's no advantage to looping through a recordset rather than using
an action query, and writing the code to do the loop takes a lot more work
than a single line of code to run the query.

For some reason I thought it would be "better" to not use queries whenever
possible. Don't really know why I thought that. I guess because when I first
started with Access, I had queries for everything. Now I 'm trying to cut back
on queries where-ever possible.
I'm unsure on something else, this is being printed as a batch because its
being printed to a remote printer. Maybe I need another field, some shortened
version of: [HaveYouVisuallyCheckedPrintJobsAndTheyAreAllOK] ....since I won't
necessarily know if they printed ok, until I visually inspect them. ???

depends on when you want to update the records, as opposed to when you plan
to inspect the prints. the If statement noted above will effectively pause
when the message box pops up, until you answer the question. how and when
you call the code is at your discretion; you need to figure out the process
that you (or the end user) will go through, then decide on how to set up the
user interface to best support that process.
I agree I need to better figure out the process of the work-flow.....how many
checks.

Thanks for the help.....
 
you're welcome :)


Josh said:
comments inline.

put the header text in the PO header section, rather than the page header
section.

and a page break in group footer I assume? ok
Second question, reference updating the [Printed] from No to Yes after the

can't troubleshoot your code without seeing it, but something along the
following lines should work, as

If Msgbox("Do you want to mark these " _
& "records as printed?", vbYesNo) = vbYes Then
CurrentDb.Execute "UpdateQueryName", dbFailOnError
End If

I think I was trying to (in effect) run query, pause, then bring up the msgbox.
Don't know what I was thinking said:
but I
could but
not a code.

why do you want to update a recordset rather than run an Update query?
AFAIK, there's no advantage to looping through a recordset rather than using
an action query, and writing the code to do the loop takes a lot more work
than a single line of code to run the query.

For some reason I thought it would be "better" to not use queries whenever
possible. Don't really know why I thought that. I guess because when I first
started with Access, I had queries for everything. Now I 'm trying to cut back
on queries where-ever possible.
I'm unsure on something else, this is being printed as a batch because
its
being printed to a remote printer. Maybe I need another field, some shortened
version of: [HaveYouVisuallyCheckedPrintJobsAndTheyAreAllOK] ....since I won't
necessarily know if they printed ok, until I visually inspect them. ???

depends on when you want to update the records, as opposed to when you plan
to inspect the prints. the If statement noted above will effectively pause
when the message box pops up, until you answer the question. how and when
you call the code is at your discretion; you need to figure out the process
that you (or the end user) will go through, then decide on how to set up the
user interface to best support that process.
I agree I need to better figure out the process of the work-flow.....how many
checks.

Thanks for the help.....
 
Back
Top