ardy
Registered User.
- Local time
- Yesterday, 20:05
- Joined
- Sep 24, 2012
- Messages
- 98
It seems to be Okaytry navigating for each value. in your expression builder, click on GWM_wellProfile, select the form, select the control for me.well_id
It seems to be Okaytry navigating for each value. in your expression builder, click on GWM_wellProfile, select the form, select the control for me.well_id
=DLookUp("APN","Access_Agreement","Well_ID = '" & [Well_ID] & "'")
Bingo......... cheekybuddhaYou haven't put the quotes round the field name and table name.
Code:=DLookUp("APN","Access_Agreement","Well_ID = '" & [Well_ID] & "'")
Thanks for the reply this workedDo you have a combobox on form for user to select well? Include APN as a column then expression in textbox can reference that column by its index. If APN is in third column, its index is 2.
=cbxWell.Column(2)
Another option is to include the combobox's RowSource lookup table in the form's RecordSource and bind textbox to APN field with its properties Locked Yes and TabStop No.
This is more efficient than DLookup() as Domain Aggregate functions in query and on form can slow performance, especially with large datasets.
=DLookUp("APN","Access_Agreement","Well_ID = '" & [Well_ID] & "'")
I always thought that form control expressions had no concept of Me.the Me. should not matter
Why do you say that? Me. cannot be used in textbox expressions. Causes #Name? error.which is what was suggested in post #2 - the Me. should not matter
I always thought that form control expressions had no concept of Me.
Is there a some white papers that you guys can point me to that tells you when you got to use what
From initial post.=DLookUp("APN","Access_Agreement","Well_ID = " & Me.Well_ID & "")
IF Well_ID Not text
Confusing I know, I normally associate ID with a numeric, normally the autonumber PK/FK.(Well_ID is String)
The problem still exists with your solution - Me.Well_ID is not valid when the DLookup() is used in a fom control's ControlSource expression.=DLookUp("APN","Access_Agreement","Well_ID = " & Me.Well_ID & "")
IF Well_ID Not text