Then, whence commeth the call argument? It is not in the original. What are you doing with the return value? To simply call a function without an assignment statement does not provide for your use of the return (vaalue).
It has been a while since I have actually used the routine, as I am not presently working (in multiuser environments), so I am not sure where I placed the call statement, it was probably in an update event, but that is more or less a choice based on the overall app/design. The more normal use would be ~~:
[tab]MyNewQiNum = NewQI_Num
NAd MyQiNum is used within the remainder of the procedure in the recordset as the PK value. For a bound form, it is 'convenient' to simply assign the value to a text box bound to the recorset field, as in:
Me.TxtPk = NewQI_Num
where:
"Me." Refers to the bound form of the recordset
"TxtPk" refer s to the specific control, and it's control source is the PK field of the recordset.
and NewQI_Num is, of course, the function which returns the actual value.
All of that being said, I would have some reservations in your being able to implement this procedure. I do not mean to be harsh, but the level of experience demonstrated in this thread does not indicate sufficient knowledge of programming in general to be involved in multiuser applications requiring routines of even this modest level of sophistication. At best, I would advise you to use the procedure in a test application before implementing it in a live (production) database. I would further strongly suggest that you either 'beg off' this particular assignment -at least for a while- and run (do not walk?) to the nearest book store and get a couple of the third party tutorials/reference books re Ms. A. and VB(A). Start a crash course in the two subjects (either self study or enrollment in formal classes). Once you feel like you could at least be able to follow the procedure (i.e. be able to generate comments/description re each line or block of the procedure), go back to the boss and let them know you are ready for the more challenging assignment.
MichaelRed
m.red@att.net
Searching for employment in all the wrong places