Invoice# field definition based on date and time

Compressor

Registered User.
Local time
Today, 17:09
Joined
Sep 23, 2006
Messages
118
In this thread:
http://www.access-programmers.co.uk/forums/showthread.php?p=549287#post549287

I had a problem. Now I decided to just make two tables, one with sales for a "passer by" and/or directly to a client without a case/labour costs. And a table for sales in relation to a case with labour costs etc. I guess I still m*ssed up on that part and have to make do with that decision (kind of like I depicted in the photoshopped image).

For invoicenumbers I want to use DDMMYYYYHHMM. When adding that field to the design of a table, how do I go about that? Do I just use a Text field and create an input mask for that? Or do I need to use a number format with a certain input mask? Or would it be wiser just to use the date/time type of field and give it a new inputmask? I guess 000000000000 would be the one for that, right? Although I read the help file I do not know if I should use ;0; behind those first group of zero's or not. Yes it is a mandatory field, but it will fill in itself as soon as a product is typed in in the product/invoice list, with a default value of the current date and time.

I need to brush up my knowledge on the formatting for that so that 28-05-1975 19:55 will be displayed and stored as 280519751955. Or is that also done automatically by using that input mask? Or will that give an error when Date or Time() etc. is used for that field in VBA?

Just a few questions I need some help with, I've been trying some stuff but it really doesn't "stick".

And if anyone has some time, I could really use some general advice/ideas for setting up the invoicing part differently for a new version of the db yet to come in the future.
 
Hmmm.... nice mistake... Meddling about with the input mask field when the formatting field should be used.....

Kick me. Please..?
 
Hello:

In your table design, just make your own custom format and put this in the "Format" property space of the table design. Something like this does it the trick......

dd-mm-yyyy: hh:nnampm
Regards
Mark
 
Format field:
ddmmyyyyhhnn
with a default of =Now()

I was messing around with the input mask field.... Argh...
 

Users who are viewing this thread

Back
Top Bottom