General discussion

Locked

How to create a pop-up dialog box ?

By alann ·
How can you create a pop-up dialog box appeared when clicking on a Report, asking for Status which can tell a query to select certain data for the Report?

I have a Transaction table which contains all data inputed from a Form (DataEntry), a query(PPR) and a Report (ReportByStatus). In the Trasaction table, there is a Status field which has "Open, Rejected, RFT..". I want to create an automatic dialog box asking for entering status when I click to open the ReportByStatus. If I don't enteranything in the dialog box, the Report will show all data.

Thank you,
Alan.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

How to create a pop-up dialog box ?

by roc180 In reply to How to create a pop-up di ...

Use the Inputbox function. The following code should accomplish what you want.

Private Sub CmdOpenRpt_Click()
Dim strAns as string

strAns = InputBox("Enter Status", _
"This is my title", "Default value=1")

If strAns="" then 'Nodata entered or Cancel

Else
'Build Query for Report, using
'Parameter strAns

Docmd.OpenReport "Rpt"
End if

End Sub

If you need any more help let me know.

Good Luck

Neal Martinelli

Collapse -

How to create a pop-up dialog box ?

by alann In reply to How to create a pop-up di ...

The question was auto-closed by TechRepublic

Collapse -

How to create a pop-up dialog box ?

by kbrown In reply to How to create a pop-up di ...

You can also create a pop-up dialog for criteria very easily in the query's design view. In one of the criteria boxes enter your question surrounded by brackets.

Example: [Enter Status (Open, Rejected, RFT ...):]

This is very quick and easy and will pop up with queries, reports or forms.

Collapse -

How to create a pop-up dialog box ?

by alann In reply to How to create a pop-up di ...

The question was auto-closed by TechRepublic

Collapse -

How to create a pop-up dialog box ?

by alann In reply to How to create a pop-up di ...

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums