I am currently trying to get a new record's id number assigned to a variable. I'm not too sure how to proceed. I've tried a recordset approach. However, that didn't seem to work. Moreover, I've tried getting the current record number but the actual record number is different from the Autnumber ID number.
I'm trying to do the above for a Work Order form. The form has two fields on it among others entitled "Machine Number" and "Machine Description." I'm trying to fill in the Machine Description by assigning the Machine Number that is selected to a variable and then using that variable to do a "find" in a recordset for that machine and then its corresponding description. Before I can do that however, I have to be able to find the record for the Work Order record which contains the Machine Number. Perhaps it is possible to pass the selected number straight to a variable, but I've not been able to find any code to do this.
I've tried the Me!. However I keep getting an error message that says that I am using it incorrectly. What's funny here is that I typed it in exactly the way the example says in the help file and still got the same error message.
Perhaps I am going about this the wrong way. Any comments would be much appreciated.
Thanks
I'm trying to do the above for a Work Order form. The form has two fields on it among others entitled "Machine Number" and "Machine Description." I'm trying to fill in the Machine Description by assigning the Machine Number that is selected to a variable and then using that variable to do a "find" in a recordset for that machine and then its corresponding description. Before I can do that however, I have to be able to find the record for the Work Order record which contains the Machine Number. Perhaps it is possible to pass the selected number straight to a variable, but I've not been able to find any code to do this.
I've tried the Me!. However I keep getting an error message that says that I am using it incorrectly. What's funny here is that I typed it in exactly the way the example says in the help file and still got the same error message.
Perhaps I am going about this the wrong way. Any comments would be much appreciated.
Thanks