J
Jack
Hi,
I am using the following code to grab the output of a query (single row
single column output) in a temporary variable. The intention is to use this
variable value to update another table row field I have placed the code to an
after update of a list box field. However I am getting the following error
while running the code
CODE:
Dim Db As DAO.Database, Rs As DAO.Recordset
Dim sSQL As String
Dim temp_email_var As String
'Set environment
Set Db = CurrentDb
'DoCmd.SetWarnings True
'Open the controlling recordset
Set Rs = Db.OpenRecordset("z_QueryEmailUpdateSource")
temp_email_var = Rs(0)
Rs.Close
Set Rs = Nothing
The above query does return correct value(I have checked it.
I am not sure how to figure this out. Thanks for any help
I am using the following code to grab the output of a query (single row
single column output) in a temporary variable. The intention is to use this
variable value to update another table row field I have placed the code to an
after update of a list box field. However I am getting the following error
while running the code
CODE:
Dim Db As DAO.Database, Rs As DAO.Recordset
Dim sSQL As String
Dim temp_email_var As String
'Set environment
Set Db = CurrentDb
'DoCmd.SetWarnings True
'Open the controlling recordset
Set Rs = Db.OpenRecordset("z_QueryEmailUpdateSource")
temp_email_var = Rs(0)
Rs.Close
Set Rs = Nothing
The above query does return correct value(I have checked it.
I am not sure how to figure this out. Thanks for any help