paulmcdonnell
Ready to Help
- Local time
- Today, 09:44
- Joined
- Apr 11, 2001
- Messages
- 167
Hi Guys,
I'm using the following code to update a set of address fields from a table when a company is selected from a combo box...
Dim dbf As Recordset, qdf As QueryDef, strSQL As String
strSQL = "SELECT * FROM [Purchases] WHERE " _
& "[Company] = " & Me![Company]
Set dbf = CurrentDb.OpenRecordset(strSQL)
Me![Address_1] = dbf![Address_1]
Me!Address_2 = dbf![Address_2]
However I keep getting the following error
"User-defined type not defined"
with the debugger highlighting...
dbf As Recordset
Is this a reference problem or otherwise?
Hope you can help
Chers
Paul
I'm using the following code to update a set of address fields from a table when a company is selected from a combo box...
Dim dbf As Recordset, qdf As QueryDef, strSQL As String
strSQL = "SELECT * FROM [Purchases] WHERE " _
& "[Company] = " & Me![Company]
Set dbf = CurrentDb.OpenRecordset(strSQL)
Me![Address_1] = dbf![Address_1]
Me!Address_2 = dbf![Address_2]
However I keep getting the following error
"User-defined type not defined"
with the debugger highlighting...
dbf As Recordset
Is this a reference problem or otherwise?
Hope you can help
Chers
Paul