hi, I am looking to try an make a access database which automatically generates the next available number based on the following:
Fields
Ref start
Ref end
User
Date used
Use Type
Conditions
1) Ref start is the date in format "YYMM" and is based on the month for the invoice (this might be back dated so if "date used" is changed, this is also changed)
UPDATE: I have solved part 1, just need to work out how to do part 2 below
2) Ref end is the end of the reference field which is unique to that month, i.e. 001
2a) if a invoice is backdated, i.e. "date used" is changed, the ref end is based on the next available number in that month/year, not the next number for the current month.
I have made a database and form and understand basic access macro's and VB but cannot figure out how I would go about doing this. I think I need to somehow use a database search/filter to check what records are on the database and somehow from that allocate the next number but am a bit lost!
If you are able to help it will be much appreciated.
Thanks a lot!
llaadd.
Fields
Ref start
Ref end
User
Date used
Use Type
Conditions
1) Ref start is the date in format "YYMM" and is based on the month for the invoice (this might be back dated so if "date used" is changed, this is also changed)
UPDATE: I have solved part 1, just need to work out how to do part 2 below
2) Ref end is the end of the reference field which is unique to that month, i.e. 001
2a) if a invoice is backdated, i.e. "date used" is changed, the ref end is based on the next available number in that month/year, not the next number for the current month.
I have made a database and form and understand basic access macro's and VB but cannot figure out how I would go about doing this. I think I need to somehow use a database search/filter to check what records are on the database and somehow from that allocate the next number but am a bit lost!
If you are able to help it will be much appreciated.
Thanks a lot!
llaadd.
Last edited: