employee number from query

  • Thread starter Thread starter Troy
  • Start date Start date
T

Troy

I don't know how to go about asking this question, but I'll explain what I'm
doing. I have a form that a user opens and automatically to new record. I
have a query that does a comparison of two tables and shows only employee
numbers not in use. I would like the user to be able to select a number from
this query and have it enter in the employee number field on the form for
the new record using code. Is this possible? What should I do?

Thanks!

Troy
 
Troy said:
I don't know how to go about asking this question, but I'll explain what I'm
doing. I have a form that a user opens and automatically to new record.

Using the data entry property on the form?

I have a query that does a comparison of two tables and shows only employee
numbers not in use.

These numbers are displayed where? What do you mean by numbers not in use?
I would like the user to be able to select a number from
this query and have it enter in the employee number field on the form for
the new record using code.Is this possible? What should I do?

I don't know what you really want to do here but if I read between the lines..
..

You could put in a listbox on your form. Make the query you have for numbers
not in use, it's recordsource. In the after update event:

Me.txtEmpNumber = lstEmpNoNotInUse.Column(1)
 
Using the onload form, goto new record. The numbers are displayed in a
query. The numbers not in use are employee numbers. When someone resigns
their number goes back into the pool.

I think what you said will work. I will try it tomorrow at work.

Thanks!
 
Back
Top