DLookup - HELP ME PLEASE!!!

R

rigby

HELP ME PLEASE!!!
I am losing it. I just cannot seem to grasp how to make this problem work. I
am getting somewhere but nowhere fast. I have 2 tables. both using a unique
ID Number for my security officers. in the one table i have their first name
and last name listed in sperarate columns (tblStatus). the other table has a
column for 'security officer' where i would like to have their names appear
as 'last name, first name' when i type in their ID Number. Now, I have
managed to create a query, using SQL view, to create a column of its own
apearing with the names as i would like them to called 'Fullname'.

How on earth can i now get a form called 'M/V Alaska' to show the final
'fullname' answer in the 'security officer' field. please can someone explain
to this uneducated fool, in a step by step way how to do this. i cannot
believe how long it has taken me to get nowhere with this. I will buy whoever
helps me, a pint or two if it works.

PLEASE> thank you all kindly for your patience

Rigby
 
S

schasteen

It sounds like you may need to change your table structure just a littile.
You can show then name the way you want it in the form and reports, but just
store the unique ID in your other table. Then create a form based on your
other table and make sure for the unique ID field you use a combo box. Set
the row source (under data tab) for the combo box to something like
SELECT [tblStatus].UniqueID, [LastName] & ", " & [FirstName] AS FullName
FROM [tblStatus]
Change the coulmn count (Format Tab) to 2 and Column Width (also Format Tab)
to 0";1"

The combo box will now show the full name on the form and store the unique
ID in the table.

Hope this helps
 
R

rigby

Thank you so much. I have finally been able to fix the problem, HUGE thanks
to you. whenever you are next in my area, i will buy you a pint or 2.
cheers


schasteen said:
It sounds like you may need to change your table structure just a littile.
You can show then name the way you want it in the form and reports, but just
store the unique ID in your other table. Then create a form based on your
other table and make sure for the unique ID field you use a combo box. Set
the row source (under data tab) for the combo box to something like
SELECT [tblStatus].UniqueID, [LastName] & ", " & [FirstName] AS FullName
FROM [tblStatus]
Change the coulmn count (Format Tab) to 2 and Column Width (also Format Tab)
to 0";1"

The combo box will now show the full name on the form and store the unique
ID in the table.

Hope this helps


rigby said:
HELP ME PLEASE!!!
I am losing it. I just cannot seem to grasp how to make this problem work. I
am getting somewhere but nowhere fast. I have 2 tables. both using a unique
ID Number for my security officers. in the one table i have their first name
and last name listed in sperarate columns (tblStatus). the other table has a
column for 'security officer' where i would like to have their names appear
as 'last name, first name' when i type in their ID Number. Now, I have
managed to create a query, using SQL view, to create a column of its own
apearing with the names as i would like them to called 'Fullname'.

How on earth can i now get a form called 'M/V Alaska' to show the final
'fullname' answer in the 'security officer' field. please can someone explain
to this uneducated fool, in a step by step way how to do this. i cannot
believe how long it has taken me to get nowhere with this. I will buy whoever
helps me, a pint or two if it works.

PLEASE> thank you all kindly for your patience

Rigby
 
Top