G
Guest
I think this thread got lost a little in the passage of time and new postings. So, I'll try to compose most of the thread together in this note and hope for the best
The current setup
---------------------
Two tables, People and Memberships. I am only showing the relevant fields, there are others in each table
People Membership
-------- ---------------
ID Membership I
First Name Person ID (as a foreign key
Last Nam
One form, called MembershipsForm. All data entry is going on in the form. I am not editing the tables directly
The combo box on MembershipForms for the field Memberships.Person ID currently has the following relevant controls
Row Source: SELECT People.ID, [Last Name] & ", " & [First Name] FROM People;
After Update Event: =[Person ID].[Value]=[Person ID
Auto Expand: Ye
A graphical view of the tables
----------------------------------
Peopl
-------
ID First Name Middle Name Last Name ...other fields //this data is already entered, all names have ID
|
|------------------- Membership
| --------------
\
Membership ID Person ID ....other field
What I would like to do
---------------------------
When I enter the combo box, I would like to begin typing the first few letters of the person's last name as the hint to the auto expand. When I type in enough letters to uniquely identify the name, I want to hit return (and here's the tricky part) I want the ID to be entered into the Memberships.Person ID field. That is, I want to search on one (combined) field, but enter another field of the same record
What currently happens
---------------------------
It auto expands on People.ID
What doesn't work
---------------------
Row Source: SELECT [Last Name] & ", " & [First Name] , People.ID FROM People
After Update Event: =[Person ID].[Value]=[Person ID].[Column](1
This causes Access to try and put the name in the field, causing a type mismatch error. I have tried values of 0,1 and 2 to the Column function, with no change
Example Usage
-----------------
Do queries based on membership number and join on the ID field, producing address book data for the corresponding membership number.
TIA
Glenn
The current setup
---------------------
Two tables, People and Memberships. I am only showing the relevant fields, there are others in each table
People Membership
-------- ---------------
ID Membership I
First Name Person ID (as a foreign key
Last Nam
One form, called MembershipsForm. All data entry is going on in the form. I am not editing the tables directly
The combo box on MembershipForms for the field Memberships.Person ID currently has the following relevant controls
Row Source: SELECT People.ID, [Last Name] & ", " & [First Name] FROM People;
After Update Event: =[Person ID].[Value]=[Person ID
Auto Expand: Ye
A graphical view of the tables
----------------------------------
Peopl
-------
ID First Name Middle Name Last Name ...other fields //this data is already entered, all names have ID
|
|------------------- Membership
| --------------
\
Membership ID Person ID ....other field
What I would like to do
---------------------------
When I enter the combo box, I would like to begin typing the first few letters of the person's last name as the hint to the auto expand. When I type in enough letters to uniquely identify the name, I want to hit return (and here's the tricky part) I want the ID to be entered into the Memberships.Person ID field. That is, I want to search on one (combined) field, but enter another field of the same record
What currently happens
---------------------------
It auto expands on People.ID
What doesn't work
---------------------
Row Source: SELECT [Last Name] & ", " & [First Name] , People.ID FROM People
After Update Event: =[Person ID].[Value]=[Person ID].[Column](1
This causes Access to try and put the name in the field, causing a type mismatch error. I have tried values of 0,1 and 2 to the Column function, with no change
Example Usage
-----------------
Do queries based on membership number and join on the ID field, producing address book data for the corresponding membership number.
TIA
Glenn
Which value is it that controls (as you put it) the return value