🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.databases.ms-access
3 messages
3 total messages Started by howg Mon, 01 Feb 1999 00:00
Best way to prevent report from printing until conditions met?
#365
Author: howg
Date: Mon, 01 Feb 1999 00:00
29 lines
1710 bytes
Would like to prevent a report from printing until all conditions are met
with respect to specific textboxes.

Once the following fields have value allow then allow the report to print.
If value IS
missing then pop-up form appears with message telling user to add the
information before
the report can print.  The pop-up form should have a close/cancel button.

[control]
"message to pop-up"
---------------------
[DateofBirth]
"Enter the applicants Date of birth to continue."
[WorkTele]
"Enter the applicants Work Telephone number to continue."


I would like to do with vba code.

Can anyone get me started, refer me to book sample, refer me to db sample,
or whatever?

TIA,

howard
new york city
howg@_no_spam_earthlink.net
To reply:  remove "_no_spam_" from address
Re: Best way to prevent report from printing until conditions met?
#366
Author: Allen Browne
Date: Tue, 02 Feb 1999 00:00
50 lines
2543 bytes
Use the report's Open event. You can set it's Cancel argument to True
to prevent the report opening until the info is present.

The code will be something like this:
--------------------------------------------
Dim strForm as String   ' Name of the form 
Dim frm as Form         ' Reference to the form.

strForm = "Whatever You Called Your Form Goes Here"

' Make sure the form is open.
If SysCmd(acSysCmdGetObjectState, acForm ,strForm) = conObjStateClosed
Then
    DoCmd.OpenForm strForm
End If

' Make sure the 3 fields are filled in.
Set frm = Forms(strForm)
If IsNull(frm![DateOfBirth]) Or IsNull(frm![WorkTele]) Or
IsNull(frm![Control]) Then
    Cancel = True
    MsgBox "Some stuff is missing.", vbExclamation, "Required"
    frm.SetFocus
End If
Set frm = Nothing
--------------------------------------------

howg wrote:
> 
> Would like to prevent a report from printing until all conditions are met
> with respect to specific textboxes.
> 
> Once the following fields have value allow then allow the report to print.
> If value IS
> missing then pop-up form appears with message telling user to add the
> information before
> the report can print.  The pop-up form should have a close/cancel button.
> 
> [control]
> "message to pop-up"
> ---------------------
> [DateofBirth]
> "Enter the applicants Date of birth to continue."
> [WorkTele]
> "Enter the applicants Work Telephone number to continue."
> 
> I would like to do with vba code.
> 
> Can anyone get me started, refer me to book sample, refer me to db sample,
> or whatever?
Re: Best way to prevent report from printing until conditions met?
#367
Author: Norberto Ortiz
Date: Tue, 02 Feb 1999 00:00
1 lines
888 bytes
NO TE HAS ENTERADO QUE AQUI SE HABLA EN CRISTIANO
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads