Report asks for user input

TheMonge

New Member
Joined
Jan 16, 2003
Messages
12
Hello,

I am trying to figure out how to have the report ask me for input on specific fields in Access. I know in Oracle I used an "&" before the field name. How can I accomplish this task in Access. Thanks

Anthony
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Base the report on a query. In the query's Criteria for the field(s) that you want to prompt the user for, put something like

[Enter Your Age]

...the brackets tell Access to prompt the user with the phrase inside the brackets.

HTH,

Russell
 
Upvote 0
Thanks for the advice, it worked. One more question as a follow up. You mentioned field, I have done the [enter customer number] for one field, for the date field I typed [Enter Date Range] the problem is, after I enter the customer number it goes right to the report without asking for the second field.

Thanks.

Anthony
 
Upvote 0
It should prompt you. But if you are wanting a range, you need to do something like:

Between [Enter First Date] and [Enter Second Date]

If it is not working, post your SQL (go to View-SQL View when in your query).

HTH,

Russell
 
Upvote 0
It actually worked for 1 field. I have a report coming up displaying "Customer Number", "Customer Name", "Date", and "Payment Method" how can I have Access prompt me for asking for 2 varibles.

I tried putting the [Enter Name Here] in Customer name and [Payment Method] for the payment method but access only prompted me for the name and then went and generated the report with asking for the payment method. Thanks.

Anthony
 
Upvote 0
Here's actually a better question, I figured out the one above. How about stoping the error if I enter a null value for the field. For instance say I have the report asking me for a Customer Number and Date and I don't want to enter the date. If I leave that value blank my report comes up with errors. Any advice on that issue? Thanks!

Anthony
 
Upvote 0
It can be done. Say your Date field is called fldDate. In a blank column in the query builder, put something like the following in the "Field:" line:

IIf(IsNull([ENTER DATE]),[fldDate] Like "*",[fldDate]=[ENTER DATE])

Uncheck the "Show:" check box, and in the "Criteria" line, put:

<>False

Delete anything you currently have in the fldDate criteria (but make sure you have fldDate in your query if you want it to show).

Hope this helps,

Russell
 
Upvote 0
Your truly are the MVP! Thanks a bunch. I knwo this was requested before, any books or videos you would recommend for learning Access and Excel? I'm really looking to get into more developement in these areas.

Anthony
 
Upvote 0
Excel:

Walkenbach has very good books. Mr. Excel also has a new book out.

Access:

Access Developer's Handbook (Desktop Edition, I think it's called) is very good (by Getz, Litwin, Gilbert).
 
Upvote 0

Forum statistics

Threads
1,221,510
Messages
6,160,230
Members
451,632
Latest member
purpleflower26

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top