Just a quick query, currently i have an hire form, when the form is opened the next hireno would automatically be displayed within this box. This works fine if i already have an order stored. But if i was to clear the hire table, so no hires are currently saved, i would like 1 to be displayed within the textbox when opened. but a message appears saying, no current record.
This is what i am using
The hire no in the table is a composite key with clientID. Is there a way in which it can automatically bring up 1 in the hire form when opened when it is part of a composite key? Hireno is currently autonumber
This is what i am using
Code:
Set rsitem = currentDatabase.OpenRecordset("tblhire")
rsitem.MoveLast
txthireno.Value = rstitem("hireno") + 1
Comment