error# when using time in text box

muppetmad

Registered User.
Local time
Today, 05:49
Joined
Sep 29, 2003
Messages
42
On form A I have a text box that I can type anything into and it is saved to a table. I click a button to open form B and the data from some of the fields on form A/the table are used to populate text voxes on form B. Everthing works fine until I type a time into the text box on form A that is not a whole hour. Then when I open form B I ger Error#.

Example:

Works:Services available from 8am - 5pm M-F
Gets error:Services available from 8:30am - 5:30pm M-F

can avoyone tell me why?
 
i don't know why you're getting the formatting problem (regional settings??).
as for the Error#, maybe the record on form A hasn't been saved yet when you try to view some of the data?
 
I think it is because the data in the field is acually creating and equation. I feel like I should have the default value in quotes for the reference back but everywhere I have tried to put the quote it has given me the error. Does anyone have a suggestion. Below is what the dafault value for the form B field looks like.

=[Forms]![child demographics(datasheet)]![hrs_of_care1]
 
The field holding "Services available from 8am - 5pm M-F" or "Services available from 8:30am - 5:30pm M-F" would have to be defined as Text, assuming that this is actually the data entered. If this is so, it makes no sense whatsoever that

"Services available from 8am - 5pm M-F" works but

"Services available from 8:30am - 5:30pm M-F" doesn't.

Is this, in fact, the data that's being entered into a single textbox, or are you using several textboxes for data and then joining them together to make your statements of availability? If this is the data being entered, and it's Text, which it would have to be, regional settings don't come into play here.

Do the datatypes on FormB match the datatypes on FormA?

What exactly do you mean by "I think it is because the data in the field is acually creating and equation?" What equation? Error# is, in fact, Access' response when it can't interpret an expression being used as a Control Source.

There are so many variatins of syntax that works in Access/VBA, but I've never seen anything like

=[Forms]![child demographics(datasheet)]![hrs_of_care1].

Is the form's name really child demographics(datasheet)?

It would probably really help if you could attach your database for us to look at.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom