Best way to prompt user input?

ChuiceBox

New member
Local time
Yesterday, 18:26
Joined
Nov 6, 2011
Messages
3
Hi Access Programmers!

I am in a bit of a predicament. I have a form with a command button which runs a macro which generates a report and exports it as a pdf, this is based on a date range and some other critera. However, before this report is generated I would like to check a table for data in the date range specified in the form and prompt user input if there is no data in that date range. Checking if the data is in the table I have done using a simple DCount and then I kill the macro with some basic VBA attached to the button. My question is what would be the best way of getting the user to input the data into table? Would it be using a form? If so how can I make a form be prepopulated with say 4 sets of information i.e. Site, Date, TruckCount (By pre-populated I mean for the fields I'm entering the data into to already have values in them as there will only be one field which is unknown for each row in the table). Also it is probly worth noting the maxium number of rows for each month is 4.
 
One approach would be to add controls to your form that will provide a place for user input for all of the criteria needed for your report. You can include controls to acquire the date range (start date and end date) then as the user fills in the values in these controls, you can use VBA code in the After Update event of your controls to validate the dates provided.
 

Users who are viewing this thread

Back
Top Bottom