Set Mytable = MyDB.OpenRecordset

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Help,

I am not much of a programmer, but I have managed to build a fairly good
tool.



The original code was written in 2003 but upon the conversion to 2007, I get
a Type Mismatch on the following code.



Const ProductTable = "Products"

Dim MyTable As Recordset

Dim MyDB As Database

Dim PNHolder As String





Set MyDB = CurrentDb()

Set MyTable = MyDB.OpenRecordset(ProductTable) ---ß<<< Error appears
here??
 
Hello Tom,

ProductTable needs to be enclosed inside double quotes.

Steve
(e-mail address removed)
 
Steve, I think you missed the constant declaration on the first line of his
code.
 
and you also missed the concept that these newsgroups are not provided so
you can ply your questionable services.

John...
 
Back
Top