Emails INTO Access

W

wheather girl

Peter

thanks for your help...yeah I thought it might be a long shot, but had to
check out this option....Once again thanks, I appreciate the effort you have
gone to.

tell me I do have query which is unrelated to this one...
In my database table, I have the Auto number field, and it displays as
1,2,3, and so on when you get to double digits it displays as 10,11,12 and so
on.. I want it to be an auto number so i dont have to keep filing it in, but
i want it to display 09003-T and then the auto number ex. 09003-T0001 and
then 09003-T0002 and so on.

NOw the auto number field does not allow me enter an input mask, but it does
allow you to enter a format for that field. So i typed in !"09003-T"00
which displays as 09003-T001 and for a double digit displays as 09003-T0012
which is good, which is what I want.. i want it to display a four digit
number after the T, but if I add in another 0 in the format box ie
!"09003-T"000 then it displays 09003-T0001 which is fine for this one, but
when i get to double digits or more i get a five digit number or more instead
of keeping to a four digit number ie 09003-T00012.

I cant put a field size of 4 in there, as an the auto number field wont let
me..is there a way manipulating this so it does display a four digit number
after the T in my project number, regardless of how big or small the number
gets ie 0001 or 0045 or 0356. I should n't need any more than four digits.

see how ya go with this one.!!!
thanks
 
D

Dad

wheather girl said:
Peter

thanks for your help...yeah I thought it might be a long shot, but had to
check out this option....Once again thanks, I appreciate the effort you
have
gone to.

tell me I do have query which is unrelated to this one...
In my database table, I have the Auto number field, and it displays as
1,2,3, and so on when you get to double digits it displays as 10,11,12 and
so
on.. I want it to be an auto number so i dont have to keep filing it in,
but
i want it to display 09003-T and then the auto number ex. 09003-T0001 and
then 09003-T0002 and so on.

NOw the auto number field does not allow me enter an input mask, but it
does
allow you to enter a format for that field. So i typed in !"09003-T"00
which displays as 09003-T001 and for a double digit displays as
09003-T0012
which is good, which is what I want.. i want it to display a four digit
number after the T, but if I add in another 0 in the format box ie
!"09003-T"000 then it displays 09003-T0001 which is fine for this one, but
when i get to double digits or more i get a five digit number or more
instead
of keeping to a four digit number ie 09003-T00012.

I cant put a field size of 4 in there, as an the auto number field wont
let
me..is there a way manipulating this so it does display a four digit
number
after the T in my project number, regardless of how big or small the
number
gets ie 0001 or 0045 or 0356. I should n't need any more than four
digits.

see how ya go with this one.!!!
thanks
 
P

Peter Hibbs

Hi Wheather Girl,

Firstly, as this is a new question you should really start a new
thread so that more people will see it. Anyway, since you ask :-

No, you can't use an AutoNumber field like this. AutoNumber fields
cannot be relied upon to generate sequential numbers and also, at some
time or other, you will get gaps in the numbers, for example, if a
record is abandoned after it has been created.

What you should do is create a new Number type field (Long Integer)
and enter the next number in sequence as you create each new record
(but keep the AutoNumber field for reference purposes). If the prefix
09003-T is ALWAYS the same then you don't need to do anything more.
If, on the other hand, you will have different prefixes (are these
still your project codes?) then you would probably want to store those
in a Text type field. Then, whenever you want to display the full
number to your users on a form or report or whatever, you would just
combine the two parts like this :-

"09003-T" & Format(YourNumberField,"0000")

I am assuming the prefix code is constant here. If the value of
YourNumberField is 46 for example, then the full code would look like
this :-

09003-T0046

To create the next number in the sequence for your new number field
you would use something like this :-

YourNumberField= Nz(DMax("YourNumberField", "tblYourTable"),0) + 1

This line of code just finds the highest value for your number field,
adds 1 to it and copies it back to the field. Where you put this code
will depend on how you are creating new records, possibly in the
Before_Update event of the form which is bound to the table.

If you need more detailed information I would suggest you start a new
thread which will then be seen by more experts.

Good luck.

Peter Hibbs.
 
W

wheather girl

Thanks Peter and all the best.

Peter Hibbs said:
Hi Wheather Girl,

Firstly, as this is a new question you should really start a new
thread so that more people will see it. Anyway, since you ask :-

No, you can't use an AutoNumber field like this. AutoNumber fields
cannot be relied upon to generate sequential numbers and also, at some
time or other, you will get gaps in the numbers, for example, if a
record is abandoned after it has been created.

What you should do is create a new Number type field (Long Integer)
and enter the next number in sequence as you create each new record
(but keep the AutoNumber field for reference purposes). If the prefix
09003-T is ALWAYS the same then you don't need to do anything more.
If, on the other hand, you will have different prefixes (are these
still your project codes?) then you would probably want to store those
in a Text type field. Then, whenever you want to display the full
number to your users on a form or report or whatever, you would just
combine the two parts like this :-

"09003-T" & Format(YourNumberField,"0000")

I am assuming the prefix code is constant here. If the value of
YourNumberField is 46 for example, then the full code would look like
this :-

09003-T0046

To create the next number in the sequence for your new number field
you would use something like this :-

YourNumberField= Nz(DMax("YourNumberField", "tblYourTable"),0) + 1

This line of code just finds the highest value for your number field,
adds 1 to it and copies it back to the field. Where you put this code
will depend on how you are creating new records, possibly in the
Before_Update event of the form which is bound to the table.

If you need more detailed information I would suggest you start a new
thread which will then be seen by more experts.

Good luck.

Peter Hibbs.
 
A

Agent 99

Hello,

I'm using:
Access 2003 (11.8166.8221) SP3
Outlook 2003 (11.8217.8221) SP3

I found an odd behavior when using File | Get External Data | Link Tables...
| Outlook().

I selected my 'Sent Items' as the table input and it shows up nicely as a
table in my Access Database.

The Odd thing is this:
The "Received" field is the date that the email was sent (normal). Generally
the date is fine. What I noticed was that every time there is an email sent
on the last day of the month in the PM, the date is corrupted.

In one case, the "Received" date should have been 4/30/2009 7:19 PM (that's
what I see in the Outlook email message). When I look at the data in the
Access Table it shows up as 9/14/1618 1:25:36 AM. When I copy (Cntl-C) and
paste (Cntl-V) the data comes out as 1/1/1601.

All other dates are fine. There are 936 records in my file and 10 of them
are corrupted because they were received in the PM on the last day of the
month. It doesn't matter which month it's very consistently the last day of
the month in the PM. If the message is in the AM, the date is fine in both
Outlook and Access.

Has anyone else seen this? Is this a bug in Outlook or Access?

Any help or guidance would be appreciated.

Agent 99
 
A

Agent 99

Transferred to microsoft.public.access.externaldata as a question titled:
Corrupted Dates in Access Link Tables - Linking Access to Outlook(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top