Hi guys,
I have a piece of code that opens a DAO connection to another database and retreives a recordset - but i get a runtime error 3061 - too few parameters (1). My SQL is not too good so am looking for some hints...
Dim DBS As Database
Dim rst As Recordset
Set DBS = OpenDatabase("D:\Chris\Access\Development\Backups\Airline Contacts.mdb"
Set rst = DBS.OpenRecordset("SELECT * FROM PlTest WHERE IATACode = " & Desi, dbOpenSnapshot)
If rst("IataCode" = Desi Then
...rest of my code...
If I delete the WHERE part of my SQL then I get a full recordset based on the PlTest Query (900 records).
Any ideas on how I make the recordset = the current 'Desi'.
Cheers......
I have a piece of code that opens a DAO connection to another database and retreives a recordset - but i get a runtime error 3061 - too few parameters (1). My SQL is not too good so am looking for some hints...
Dim DBS As Database
Dim rst As Recordset
Set DBS = OpenDatabase("D:\Chris\Access\Development\Backups\Airline Contacts.mdb"
Set rst = DBS.OpenRecordset("SELECT * FROM PlTest WHERE IATACode = " & Desi, dbOpenSnapshot)
If rst("IataCode" = Desi Then
...rest of my code...
If I delete the WHERE part of my SQL then I get a full recordset based on the PlTest Query (900 records).
Any ideas on how I make the recordset = the current 'Desi'.
Cheers......