R
Red via AccessMonster.com
Good Morning all,
I have been trying to create a sequence number with a unique last three
digits. The number has a total of 14 digits. I can concatenate the first 11
numbers with no problem but its the last three that I can't figure out. The
last three numbers needs to be the first, second, third entry of the day for
example, 001, 002, 003 etc... This number will need to reset back to 001 the
next day. I have looked all through the messages in this news group and on
the web for something I can use to get me pointed in the right direction, but
no luck. I will include the form and query information I am currently using.
Any help will be greatly apprecaited.
Query SQL:
SELECT Invoices.[CONSULTANT NAME], tblConsultants.providerCo, tblConsultants.
address1, tblConsultants.address2, tblConsultants.addressCityZip,
Authorization.[AUTHORIZATION NUMBER], [Patient Info].SSN, [Patient Info].
[LAST NAME], [Patient Info].[FIRST NAME], [Patient Info].ADDRESS1, [Patient
Info].ADDRESS2, [Patient Info].ZIP_CODE, [Patient Info].[HOME PHONE],
[Patient Info].DOB, Authorization.[TYPE OF APPOINTMENT], Authorization.
[REFERRING PROVIDER], Authorization.[REFERRING CLINIC], [Patient Info].RANK,
Invoices.[HOSP INVOICE #], Invoices.[APPT DATE], Invoices.[ACTUAL COST POUNDS]
, Authorization.[CIVILIAN SPECIALTY], "F2P4MD6" AS Exp1, Format(DatePart('y',
Date()),"000") AS JulDate, "HH" AS Exp2, DMax(0,1) AS SeqNum
FROM [Patient Info] LEFT JOIN (([Authorization] LEFT JOIN Invoices ON
Authorization.[AUTHORIZATION NUMBER] = Invoices.[AUTHORIZATION NUMBER]) LEFT
JOIN tblConsultants ON Invoices.[CONSULTANT NAME] = tblConsultants.
[Consultant Name]) ON [Patient Info].[PT ID] = Authorization.[PT ID];
Form field:
Control Source =[Exp1] & "" & [JulDate] & "" & [Exp2] & "" & [SeqNum]
Its the SeqNum I can't get to work. Thanks again for any suggestions and if
I need to provide more information, please let me know.
VR,
Red
I have been trying to create a sequence number with a unique last three
digits. The number has a total of 14 digits. I can concatenate the first 11
numbers with no problem but its the last three that I can't figure out. The
last three numbers needs to be the first, second, third entry of the day for
example, 001, 002, 003 etc... This number will need to reset back to 001 the
next day. I have looked all through the messages in this news group and on
the web for something I can use to get me pointed in the right direction, but
no luck. I will include the form and query information I am currently using.
Any help will be greatly apprecaited.
Query SQL:
SELECT Invoices.[CONSULTANT NAME], tblConsultants.providerCo, tblConsultants.
address1, tblConsultants.address2, tblConsultants.addressCityZip,
Authorization.[AUTHORIZATION NUMBER], [Patient Info].SSN, [Patient Info].
[LAST NAME], [Patient Info].[FIRST NAME], [Patient Info].ADDRESS1, [Patient
Info].ADDRESS2, [Patient Info].ZIP_CODE, [Patient Info].[HOME PHONE],
[Patient Info].DOB, Authorization.[TYPE OF APPOINTMENT], Authorization.
[REFERRING PROVIDER], Authorization.[REFERRING CLINIC], [Patient Info].RANK,
Invoices.[HOSP INVOICE #], Invoices.[APPT DATE], Invoices.[ACTUAL COST POUNDS]
, Authorization.[CIVILIAN SPECIALTY], "F2P4MD6" AS Exp1, Format(DatePart('y',
Date()),"000") AS JulDate, "HH" AS Exp2, DMax(0,1) AS SeqNum
FROM [Patient Info] LEFT JOIN (([Authorization] LEFT JOIN Invoices ON
Authorization.[AUTHORIZATION NUMBER] = Invoices.[AUTHORIZATION NUMBER]) LEFT
JOIN tblConsultants ON Invoices.[CONSULTANT NAME] = tblConsultants.
[Consultant Name]) ON [Patient Info].[PT ID] = Authorization.[PT ID];
Form field:
Control Source =[Exp1] & "" & [JulDate] & "" & [Exp2] & "" & [SeqNum]
Its the SeqNum I can't get to work. Thanks again for any suggestions and if
I need to provide more information, please let me know.
VR,
Red