Using the personID is not a problem right now. When I said name
before, I meant to be referring to the name of the destination. It was
still the same idea though. Sorry, for the confusion.
Actually, it is a text box. Though, I tried changing it to a combo
box for the suggestion. It will not let me set "Limit to list" to no,
as long as the bound column (primary Key) is not visible (width = 0).
Will something along the lines of Me.Recordset.getLast or something
get me in the right place to access the incoming data?
It may be important to note, the names of the destination are not
unique. There may be multiple entries for different fiscal years with
different information.
tony
"Wayne Morgan" <co***************************@hotmail.com> wrote in message news:<Aj***********@newssvr33.news.prodigy.com>...
Since the name is auto-completing, I'm assuming you're using a combo box. If
so, to bring in the PersonID, add a column to the combo box. In the Row
Source of the combo box, add the PersonID field to the query, this will add
the column. Increase the Column Count property by 1 and set the Bound Column
to the column that PersonID is in. This last step will cause the PersonID to
be stored in the form's table instead of the person's name. Set the Column
Widths property to 0 for the column that PersonID is in so that the user
doesn't see the ID field. Set Limit To List to Yes. Use the Not In List
event to add a new person to the Person table if the user enters someone who
isn't in the list.
--
Wayne Morgan
Microsoft Access MVP
"tony bergstrom" <mo******@hotmail.com> wrote in message
news:b9**************************@posting.google.c om... Ok, so I have a Form. It is a continuous form.
In the header one selects what person to view data for. Once the
person is selected, the travel information that has been budgeted for
the year associated with that person appears below (this is a 3 table,
many to many: people travel to locations).
The final line of the continuous form is to add new data. I start
typing in the name of the destination, and it autocompletes the name
if it's there (if it's not, I'm planning on bringing it to the
attention of the user via dialog box and then adding it to the
location table if necessary, but I've not started on that yet). How
can I easily grab the primary key for that name and then set in the
new record. Where is that new record located?
tony