New record macro problem

dufc

Registered User.
Local time
Yesterday, 19:47
Joined
Sep 5, 2008
Messages
10
Hello folks, I am using an access db which is one of the free one which can be downloaded from the Microsoft site.

The db is an issue tracker and its pretty much ideal for my needs except for one little problem that I hope one of you lovely people might be able to help me with.

When submitting an issue, the db has a field called Opened Date which I want to store as a General Date so that I have the date and time recorded. Now I can change this no problem in the table design however there is problem with the form where you actually submit a new issue:-

when you click on the button labelled "new issue" this runs a macro which empties the text-boxes on the form ready for a new record to be entered. Thing is it also seems to set the format of the text-box which holds the Opened Date back to a Short Date which will only hold the date and not the time.

I'm completley stumped on this one, can anybody help? I've attached the db with my post.

Thanks.
 

Attachments

In Your macro, scroll down the list to the "OpenedDateFilter" portion. Click it, then in the qhere condition for that part of the macro, is the date format, (under "Where Condition") try changing it there.
 
Well, here you go.

For opened date you currently have:

1. The control in the form set to ShortDate format.

2. The input mask is set which is for date only

3. The Default should not be =Date() but =Now() if you want time

4. The table also has the input mask set and the wrong default.

Since you are having it add the date/time when you add a record, it should not be editable and just use the default.

See attached revision of your file.
 

Attachments

You know Bob, I noticed that too, but the problem still occurred when I changed those things.

So, then I went to look at the macro and noticed the date filter on it.
 
You know Bob, I noticed that too, but the problem still occurred when I changed those things.

So, then I went to look at the macro and noticed the date filter on it.

If you look at my attachment you will see that I fixed it by fixing all of my things, and it didn't need to fix that macro. The form had the control's format set to Short Date and that doesn't help either and having the default set to Date() instead of Now() wouldn't and having an input mask of date only won't help (in this case the input mask wasn't needed at all).
 
Thanks for the replies guys.

bob - yes I tried changing all those things (input masks etc) but that didn't seem to solve the problem when adding a new record, so I put everything back to its original state when I posted it on here.

Howere I obviously overlooked something as your solution seems to work now. Thanks very much!
 
Ahhh, I finally see what I was doing wrong, I changed the control format to general, but not in the data section, I hadn't taken out the input mask and changed the default there, only in the table itself! Please excuse my faulty answer in post 2, I never would have suggested what I did if, I had realized that one part.

Thanks Bob!
 
Ahhh, I finally see what I was doing wrong, I changed the control format to general, but not in the data section, I hadn't taken out the input mask and changed the default there, only in the table itself! Please excuse my faulty answer in post 2, I never would have suggested what I did if, I had realized that one part.

Thanks Bob!
Hey, no problem. The fun thing with some of these problems is that there can be MANY places which need changing and so you have to look through real carefully to see if you got everything. It is something I've been burned on many times, so I try to start looking all over the place now. :D
 

Users who are viewing this thread

Back
Top Bottom