Date prompt on form opening

tobyccdata

Registered User.
Local time
Today, 14:22
Joined
Aug 21, 2017
Messages
12
Hi everyone,

I have a form for input data, in this form there is a date field. For this date field I want a prompt to come up which ask for the date and then the date field is that prompt date. I can then add as many records as i want and that date field will have that number.

So if my form is say invoice, with a date field date_invoice.

My thought is to create a query with just the date field with criteria [Enter Start Date].

Then I have a main menu with a button to open invoice form, i am thinking i have to include it there but now sure, i am a little confused and may not even be on the right track.
 
Greetings Tobyccdata,

Give this a look over: http://allenbrowne.com/ser-24.html

That being said, if the date is an important bit of data which they usually are, be careful about auto populating it, people get lazy and will simply leave it as is instead of verifying it.
 
Thanks NauticalGent

The date in this case is only for reference and records, and this field will be used to filter reports. To reduce time time I have been asked to work on this.

My idea is, that I have a data input form which is opened through a command button when clicked on, the user is prompted for the date and then prompted for their ID. So they might be manually inputting 200 records but that date and ID field for every record is generated from that initial prompt.

This will then also allow for us to if time permits get a start on tmrw's work, so we could input tmrw's date and initials.

Then I have created my reports which have the date prompt, and filter by that.

I figured that because my reports are based off a query and you can allow them to ask for the date you would be able to do the same kind of thing with a form opening.

I did come across that link you supplied but because it wont always but the same as the last record and i thought with what can be done with access this might be possible.
 
My idea is, that I have a data input form which is opened through a command button when clicked on, the user is prompted for the date and then prompted for their ID. So they might be manually inputting 200 records but that date and ID field for every record is generated from that initial prompt.

...

I did come across that link you supplied but because it wont always but the same as the last record and i thought with what can be done with access this might be possible.

Exactly, if your command button opens a form in Data Entry mode, the fields would all be blank the first time and then any fields you include in Allen Browne's code would be populated going foreword for that Data Entry session only...which is what I think you are asking for.

Data Entry mode is the key...
 
Excellent I have caught on now, great thank you for the response
 
I have implemented your advice and it is running how it should,cheers. just as a reference I have attached an example which I will still work towards. IF you open the form it comes up with two prompts, eventually i will try and figure a way of having the date be the value for Tran_Date and the ID to populate the Control_ID with the input for that session for any new records added.

It might take me a while but it is a desired goal.
 

Attachments

Has anybody got any thoughts, on if my idea in the above attached file is possible or not?
 
You might find it easier to use the data in your form if you use input boxes rather than query parameters

However, I would suggest you replace the date prompt with a date picker calendar control. Rather than the one provided with Access, you might like this one:

attachment.php


You can find it here if you are interested:

https://www.access-programmers.co.uk/forums/showpost.php?p=1533910&postcount=2
 

Attachments

  • DatePicker.PNG
    DatePicker.PNG
    11.2 KB · Views: 404
with regard to the date picker, in Access versions from A2007 on? if you have a textbox formatted as a date, then access will automatically add a small date-picker to the right of the text box. (you can suppress it).

Are your dates stored as "dates" or as text of some sort?
 
I managed to work out how to solve the original issue the way i wanted to. I will attach an example of the result for reference later.
 

Users who are viewing this thread

Back
Top Bottom