If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Hard-coded date in an Access Form
Good morning,
I have created a form for our field reps which they will be completing to escalate an employee issue. One field I have in my bound table is "Date Submitted". Instead of leaving this open and up to the rep to fill in (and possibly back date!), I would like to hard-code for "today" to drop right into that field within the form. Could I create a macro to accomplish this? Any help or suggestions on how to are greatly appreciated. Regards, Scott |
#2
|
|||
|
|||
Hard-coded date in an Access Form
No macro or code necessary. Set the default value to;
Date() which will return the current date. -- _________ Sean Bailey "millerwms" wrote: Good morning, I have created a form for our field reps which they will be completing to escalate an employee issue. One field I have in my bound table is "Date Submitted". Instead of leaving this open and up to the rep to fill in (and possibly back date!), I would like to hard-code for "today" to drop right into that field within the form. Could I create a macro to accomplish this? Any help or suggestions on how to are greatly appreciated. Regards, Scott |
#3
|
|||
|
|||
Hard-coded date in an Access Form
Put a new field in your table called Last_updated. Then in the events
properties of the textbox where date is, go to the onclick event and add this code: Me.Last_updated=Now() -- Milton Purdy ACCESS State of Arkansas "millerwms" wrote: Good morning, I have created a form for our field reps which they will be completing to escalate an employee issue. One field I have in my bound table is "Date Submitted". Instead of leaving this open and up to the rep to fill in (and possibly back date!), I would like to hard-code for "today" to drop right into that field within the form. Could I create a macro to accomplish this? Any help or suggestions on how to are greatly appreciated. Regards, Scott |
#4
|
|||
|
|||
Hard-coded date in an Access Form
Thank you Mr. Purdy,
You actually bring up a good point for me to add a separate field to capture updated date, though I would still like to capture separately submit date. Prior to seeing these responses, I found the answer on how to add default dates. I appreciate the quick responses! Regards, Scott "golfinray" wrote: Put a new field in your table called Last_updated. Then in the events properties of the textbox where date is, go to the onclick event and add this code: Me.Last_updated=Now() -- Milton Purdy ACCESS State of Arkansas "millerwms" wrote: Good morning, I have created a form for our field reps which they will be completing to escalate an employee issue. One field I have in my bound table is "Date Submitted". Instead of leaving this open and up to the rep to fill in (and possibly back date!), I would like to hard-code for "today" to drop right into that field within the form. Could I create a macro to accomplish this? Any help or suggestions on how to are greatly appreciated. Regards, Scott |
#5
|
|||
|
|||
Hard-coded date in an Access Form
Mr. Bailey,
I have set this up in my general properties, but on my form it is kicking back a date of 12/30/1899. I thought this might be due to the dates within my machine, but when I use the "today" radio button within the date picker, the proper date populates. Any suggestions? Thanks in advance! Scott "Beetle" wrote: No macro or code necessary. Set the default value to; Date() which will return the current date. -- _________ Sean Bailey "millerwms" wrote: Good morning, I have created a form for our field reps which they will be completing to escalate an employee issue. One field I have in my bound table is "Date Submitted". Instead of leaving this open and up to the rep to fill in (and possibly back date!), I would like to hard-code for "today" to drop right into that field within the form. Could I create a macro to accomplish this? Any help or suggestions on how to are greatly appreciated. Regards, Scott |
#6
|
|||
|
|||
Hard-coded date in an Access Form
I am having trouble locating events properties. Do you mean within field
properties? I am using date/time data type. I am sure these are simple questions, and appreciate your feedback and patience. Scott "golfinray" wrote: Put a new field in your table called Last_updated. Then in the events properties of the textbox where date is, go to the onclick event and add this code: Me.Last_updated=Now() -- Milton Purdy ACCESS State of Arkansas "millerwms" wrote: Good morning, I have created a form for our field reps which they will be completing to escalate an employee issue. One field I have in my bound table is "Date Submitted". Instead of leaving this open and up to the rep to fill in (and possibly back date!), I would like to hard-code for "today" to drop right into that field within the form. Could I create a macro to accomplish this? Any help or suggestions on how to are greatly appreciated. Regards, Scott |
#7
|
|||
|
|||
Hard-coded date in an Access Form
Nevermind, I figured it out - my value was redundant. Thank you!
"millerwms" wrote: Mr. Bailey, I have set this up in my general properties, but on my form it is kicking back a date of 12/30/1899. I thought this might be due to the dates within my machine, but when I use the "today" radio button within the date picker, the proper date populates. Any suggestions? Thanks in advance! Scott "Beetle" wrote: No macro or code necessary. Set the default value to; Date() which will return the current date. -- _________ Sean Bailey "millerwms" wrote: Good morning, I have created a form for our field reps which they will be completing to escalate an employee issue. One field I have in my bound table is "Date Submitted". Instead of leaving this open and up to the rep to fill in (and possibly back date!), I would like to hard-code for "today" to drop right into that field within the form. Could I create a macro to accomplish this? Any help or suggestions on how to are greatly appreciated. Regards, Scott |
#8
|
|||
|
|||
Hard-coded date in an Access Form
Hello,
I was able to enter the code listed below in the events properties in my form design view, but received the following message when confirming in form view: "The expression On Click you entered as the event property setting produced the collowing error: The object doesn't contain the Automation object "Me.". Any ideas? Thanks Again, Scott "golfinray" wrote: Put a new field in your table called Last_updated. Then in the events properties of the textbox where date is, go to the onclick event and add this code: Me.Last_updated=Now() -- Milton Purdy ACCESS State of Arkansas "millerwms" wrote: Good morning, I have created a form for our field reps which they will be completing to escalate an employee issue. One field I have in my bound table is "Date Submitted". Instead of leaving this open and up to the rep to fill in (and possibly back date!), I would like to hard-code for "today" to drop right into that field within the form. Could I create a macro to accomplish this? Any help or suggestions on how to are greatly appreciated. Regards, Scott |
#9
|
|||
|
|||
Hard-coded date in an Access Form
Let's take a step back here. Have you now decided to add another
field to your table to track every time the record is modified? If so, the On Click event of the Date Submitted text box is the WRONG event to be doing this in. You would want to use the Before Update event of the form. Also, I'm guessing that you're attemptimg to just put that line directly in the properies of the control, which won't work. You would need to open the code window and put it there. Why don't you post back and let us know exactly what it is that you want to happen, and we can give you more advice. -- _________ Sean Bailey "millerwms" wrote: Hello, I was able to enter the code listed below in the events properties in my form design view, but received the following message when confirming in form view: "The expression On Click you entered as the event property setting produced the collowing error: The object doesn't contain the Automation object "Me.". Any ideas? Thanks Again, Scott "golfinray" wrote: Put a new field in your table called Last_updated. Then in the events properties of the textbox where date is, go to the onclick event and add this code: Me.Last_updated=Now() -- Milton Purdy ACCESS State of Arkansas "millerwms" wrote: Good morning, I have created a form for our field reps which they will be completing to escalate an employee issue. One field I have in my bound table is "Date Submitted". Instead of leaving this open and up to the rep to fill in (and possibly back date!), I would like to hard-code for "today" to drop right into that field within the form. Could I create a macro to accomplish this? Any help or suggestions on how to are greatly appreciated. Regards, Scott |
Thread Tools | |
Display Modes | |
|
|