I have a table, 'Jobs,' for all the jobs in our office that contains the fields JobName and JobNumber. I also have second table, 'Time Cards,' that also has the fields JobName and JobNumber and whose values are selected via a combo box linked to the values in 'Jobs.' What I would like to do is after JobName is selected in the table 'Time Cards,' JobNumber is set automatically.
Conceptually its easy to do, but I'm having a Dickens of a time figuring out how. My Time Cards form is a datasheet. I created a Module that gets fired after JobName is updated, but I couldn't find a Function to set the value of JobNumber based on the record number. In my module I have the line "recordNumber = JobName" which correctly returns the record number in 'Jobs' that contains JobName. How do I then set JobNumber based on the value of recordNumber?
It may be that I don't even have to use a Module. If someone could clue me in on the best way to proceed, I'd really appreciate it.
Thanks!
Rich
Conceptually its easy to do, but I'm having a Dickens of a time figuring out how. My Time Cards form is a datasheet. I created a Module that gets fired after JobName is updated, but I couldn't find a Function to set the value of JobNumber based on the record number. In my module I have the line "recordNumber = JobName" which correctly returns the record number in 'Jobs' that contains JobName. How do I then set JobNumber based on the value of recordNumber?
It may be that I don't even have to use a Module. If someone could clue me in on the best way to proceed, I'd really appreciate it.
Thanks!
Rich