Text boxes on form show Time, should be blank

wwiSports

New member
Local time
Today, 04:40
Joined
Jul 15, 2002
Messages
7
I have an unbound form called "Orders", which has about 5 Text Boxes (ShipDt1, ShipDt2, etc...). I have set the format as ShortDate on the form. My issue is that when I have someone's order up--if we have shipped their item to them,the date appears correctly, but in all of the other "ShipDt" fields the time 12:00:00AM appears.

I would like the ShipDt fields to be blank unless there is a date entered.

Another issue with these ShipDate fields is that when I open an order already there, we are not able to edit the ship date in their order, we have to close the form and go to the table to enter the ship date--this isn't a problem for me because I know how to do it, but it is a problem for the data entry people because they don't. We also shouldn't have to.

Any help on these two issues?
 
1. When you populate the date fields, use Date() rather than Now(). The Date() function only returns the current date. The Now() function returns the current date AND time.

2. If your Windows date format is set to Short Date, you should not have to set the format property for each date on a form unless you want it to be different.

3. If values are showing in fields where the user has not yet entered data it is either because you have some code behind the form that is populating the fields or because you have set default values either on the form or in the table itself.

4. If you can't edit the field on a form it may be because the field is not bound. For example, you are using a calculated value such as =Date(). The other possibility is that the field properties are set to prevent edits.
 
For the second bit Check the form properties. Make sure that 'allow edits' is set to yes. It could be something else though is the form based on a query (some types of query don't allow updates).

HTH

Rich
 
Allow Edits is set to yes. And all the fields in this form are unbound. According to the code it should be showing up as 0. The field property in the table does not show anything.

I'm at a loss
 
This is probably unlikely, but the fields could be locked. Go to the properties of the fields in question and make sure locked is set to 'No'.

So, can these fields 'get focus' or are you simply getting an area message when you try to make any alterations? If so, what's the error message?
 
The fields are not locked, and they are able to get focus. I have realized that the invoice section on the form is based on a query--and that may be why it does not save the information...because the query does not allow it. But, that shouldn't effect the fact that the fields are showing 12:00:00AM rather than being blank unless a date has been entered.

I show that in the Option explicit statement, that it is coded as

Dim aShipDt () as Date

Which I believe should show everything to be correct right?

This database was written by someone else. There are two databases that I am bringing into one, and a few issues I am having trouble with. For some reason all the forms are unbound in this database. I don't want to change the format too much because the data entry people are used to the format that is already there.

Make sense?
 
Check your table(s) for default values defined on column level.

RV
 

Users who are viewing this thread

Back
Top Bottom