If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Set Mytable = MyDB.OpenRecordset
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?? |
#2
|
|||
|
|||
Set Mytable = MyDB.OpenRecordset
Try:
Dim MyTable As DAO.Recordset Multiple libraries have a Recordset object. More info: http://allenbrowne.com/ser-38.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Tom" wrote in message ... 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?? |
#3
|
|||
|
|||
Set Mytable = MyDB.OpenRecordset
Just figured it out... thanks much
"Allen Browne" wrote in message ... Try: Dim MyTable As DAO.Recordset Multiple libraries have a Recordset object. More info: http://allenbrowne.com/ser-38.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Tom" wrote in message ... 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?? |
#4
|
|||
|
|||
Set Mytable = MyDB.OpenRecordset
Hello Tom,
ProductTable needs to be enclosed inside double quotes. Steve "Tom" wrote in message ... 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?? |
#5
|
|||
|
|||
Set Mytable = MyDB.OpenRecordset
Steve, I think you missed the constant declaration on the first line of his
code. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Steve" wrote in message ... ProductTable needs to be enclosed inside double quotes. 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?? |
#6
|
|||
|
|||
Set Mytable = MyDB.OpenRecordset
Yes I did. Thank you!
"Allen Browne" wrote in message ... Steve, I think you missed the constant declaration on the first line of his code. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Steve" wrote in message ... ProductTable needs to be enclosed inside double quotes. 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?? |
#7
|
|||
|
|||
Set Mytable = MyDB.OpenRecordset
and you also missed the concept that these newsgroups are not provided so
you can ply your questionable services. John... "Steve" wrote in message ... Yes I did. Thank you! "Allen Browne" wrote in message ... Steve, I think you missed the constant declaration on the first line of his code. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Steve" wrote in message ... ProductTable needs to be enclosed inside double quotes. 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?? |
Thread Tools | |
Display Modes | |
|
|