In Access 97, I would like a way to increment a text "value" by one with a command button. I have:
tblTrainNo
TrainID autonum
TrainNo text
TrainNo is in the form of YYYYPAT#, like 2007PAT23.
Can I add a cmdButton to frmAddNewTrainNo that will increment the last TrainNo by 1? frmAddNewTrainNo has a record source tblTrainNoQuery, which is:
SELECT tblTrainNo.TrainNo
FROM tblTrainNo
ORDER BY Val(Mid(TrainNo,8)) DESC;
For example, if the last TrainNo is 2007PAT89, I would like the button to add 2007PAT90 to tblTrainNo.
Thanks, Brian
tblTrainNo
TrainID autonum
TrainNo text
TrainNo is in the form of YYYYPAT#, like 2007PAT23.
Can I add a cmdButton to frmAddNewTrainNo that will increment the last TrainNo by 1? frmAddNewTrainNo has a record source tblTrainNoQuery, which is:
SELECT tblTrainNo.TrainNo
FROM tblTrainNo
ORDER BY Val(Mid(TrainNo,8)) DESC;
For example, if the last TrainNo is 2007PAT89, I would like the button to add 2007PAT90 to tblTrainNo.
Thanks, Brian