![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have a table which contains 2 fields, Initials and Full Name. On my input form I have 2 fields, Initials and Full Name. I want users to be able to select Initials only and access to populate the Full Name field automatically on my form. Thanks |
#3
| |||
| |||
|
|
On Thu, 22 Jan 2009 02:47:31 -0800, Paul wrote: Hi, I have a table which contains 2 fields, Initials and Full Name. On my input form I have 2 fields, Initials and Full Name. I want users to be able to select Initials only and access to populate the Full Name field automatically on my form. Thanks Is your form entering data into the same table or into a different table? *If the former, why are you storing the same person again if they are already in there? *If the latter why copy both fields to the new table? *In that scenario you should be copying only the Primary Key value from the first table and then using lookup mechanisms to *display* other data about the person on your form without copying it. *Is that what you are trying to do? If so, the more common methods are to use Dlookup(), a query for your form that joins to the other table (this can affect edit-ability of your form), ComboBoxes with hidden extra columns from which you can pull the other data and display it in TextBoxes, or subforms. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt * at * Hunter * dot * com |
#4
| |||
| |||
|
|
On Jan 22, 12:19 pm, Rick Brandt <rickbran... (AT) hotmail (DOT) com> wrote: On Thu, 22 Jan 2009 02:47:31 -0800, Paul wrote: Hi, I have a table which contains 2 fields, Initials and Full Name. On my input form I have 2 fields, Initials and Full Name. I want users to be able to select Initials only and access to populate the Full Name field automatically on my form. Thanks Is your form entering data into the same table or into a different table? If the former, why are you storing the same person again if they are already in there? If the latter why copy both fields to the new table? In that scenario you should be copying only the Primary Key value from the first table and then using lookup mechanisms to *display* other data about the person on your form without copying it. Is that what you are trying to do? If so, the more common methods are to use Dlookup(), a query for your form that joins to the other table (this can affect edit-ability of your form), ComboBoxes with hidden extra columns from which you can pull the other data and display it in TextBoxes, or subforms. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com HI Rick, I am only going to store the Initials in the new table butwould like to display the full name on the form when a user picks theInitials. I have tried the Dllookup but can not get it to work. Thanks |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
On Thu, 22 Jan 2009 13:09:12 -0800, Paul wrote: Post the expression for DLookup you used. *Should be something like.. =DLookup("FullName", "TableName", "Initials = [InitialsControl]") -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt * at * Hunter * dot * com |
#7
| |||
| |||
|
|
On Jan 23, 12:36*am, Rick Brandt <rickbran... (AT) hotmail (DOT) com> wrote: On Thu, 22 Jan 2009 13:09:12 -0800, Paul wrote: Post the expression for DLookup you used. *Should be something like.. =DLookup("FullName", "TableName", "Initials = [InitialsControl]") -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt * at * Hunter * dot * com Hi this is what I used Private Sub Name1_AfterUpdate() =DLookup("Name", "tblnames", "Initials = [Initials1]") End Sub |
#8
| |||
| |||
|
|
On Jan 23, 12:36Â*am, Rick Brandt <rickbran... (AT) hotmail (DOT) com> wrote: On Thu, 22 Jan 2009 13:09:12 -0800, Paul wrote: Post the expression for DLookup you used. Â*Should be something like.. =DLookup("FullName", "TableName", "Initials = [InitialsControl]") -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt Â* at Â* Hunter Â* dot Â* com Hi this is what I used Private Sub Name1_AfterUpdate() =DLookup("Name", "tblnames", "Initials = [Initials1]") End Sub |
![]() |
| Thread Tools | |
| Display Modes | |
| |