Khurramshaikh47
Member
- Local time
- Today, 04:38
- Joined
- Aug 19, 2021
- Messages
- 212
Hi,
I am using DLookup in Microsoft Visual Basic for Applications,
I actually want to get the values of 3 fields:
1) COACODE
2) AccountGroup
3) AccountType
in a form, from a query "COACODE".
Visual Basic Code is:
The field COACODE and AccountGroup is appearing in my form. But instead of AccountType its ID is showing.
Please see the screenshot:
Let me tell you about the tables:
AccountType is a Table including 2 columns:
AccountGroup is another Table including 3 columns:
in AccountGroup table the AccountType column is a lookup field from AccountType table.
Thank you in advance to the experts for their precious knowledge.
I am using DLookup in Microsoft Visual Basic for Applications,
I actually want to get the values of 3 fields:
1) COACODE
2) AccountGroup
3) AccountType
in a form, from a query "COACODE".
Visual Basic Code is:
Code:
Private Sub AccountGroupID_AfterUpdate()
Me.COACODE.Value = DLookup("[COACODE]", "COACODE", "[ID]=" & Me.ID)
Me.AccountGroup.Value = DLookup("[GroupName]", "COACODE", "[ID]=" & Me.ID)
Me.AccountType.Value = DLookup("[AccountType]", "COACODE", "[ID]=" & Me.ID)
End Sub
The field COACODE and AccountGroup is appearing in my form. But instead of AccountType its ID is showing.
Please see the screenshot:
Let me tell you about the tables:
AccountType is a Table including 2 columns:
AccountGroup is another Table including 3 columns:
in AccountGroup table the AccountType column is a lookup field from AccountType table.
Thank you in advance to the experts for their precious knowledge.