Hello, this may be a complicated question but I will try to make it as clear as possible. Currenly I have a form with [Generator Name] field which auto populates the [Generator EPA ID Number] Field through the use of an after update event procedure as below. These two fields are currently in the [Generator table].
Me.Generator_EPA_ID_Number = Me![Generator Name].Column(2)
The problem is that i also need to autopopulate the [Generator Site Address] Field string which is not in a table but i have it in a seperate query. That code is below.
Expr1: Trim([Generator’s Site Address]) & *Chr(13) & Chr(10)* & Trim([City]) & ", " & Trim([St]) & " " & Trim([Zip Code])
So my problem is the fact that the [Generator Name] field is already directed toward the table and i have no way of using the address string query code. Should I recreate the query with all of the Generator Table information including the Expression above? If so how do i reference the query as opposed to the table in the VBA text below. For exampl if the query name was [Query1] and the string field would be called [Expr1]
Private Sub Generator_Name_AfterUpdate()
Me.Generator_EPA_ID_Number = Me![Generator Name].Column(2)
Thanks
Me.Generator_EPA_ID_Number = Me![Generator Name].Column(2)
The problem is that i also need to autopopulate the [Generator Site Address] Field string which is not in a table but i have it in a seperate query. That code is below.
Expr1: Trim([Generator’s Site Address]) & *Chr(13) & Chr(10)* & Trim([City]) & ", " & Trim([St]) & " " & Trim([Zip Code])
So my problem is the fact that the [Generator Name] field is already directed toward the table and i have no way of using the address string query code. Should I recreate the query with all of the Generator Table information including the Expression above? If so how do i reference the query as opposed to the table in the VBA text below. For exampl if the query name was [Query1] and the string field would be called [Expr1]
Private Sub Generator_Name_AfterUpdate()
Me.Generator_EPA_ID_Number = Me![Generator Name].Column(2)
Thanks