Access VBADiscuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I've worked on this for many hours and found basically nothing, i'm starting to think that this maybe a huge flaw in the
program language itself since there maybe no fix for it.
- compiler->Visual Basic 6.0
- o/s->Windows XP SP2
- reference->Microsoft ActiveX Data Objects
- I'm using service pack 2 windows xp which means its fully updated.
- every instance of recordset when opened is closed.
- The query works perfectly.
- In database.mdb the position field is a number and has a value.
- both sql and database strings passed into function are always valid.
- It just won't open inside mysql_query function
Every recordset i've used in this program seems to work
perfect except when i use the '=' sign or 'LIKE'
when compairing values in the sql string. I've checked
the sql string to see if it works and it does perfectly,
but it gives this error when used in the function.
Out of curiousity i removed the 'WHERE position=1' part
and it opened successfully.. to state this more blunt
'WHERE position=1' seems to be the problem.
SQL = "SELECT * FROM tblArmors WHERE position=1"
DataBase = "./database.mdb"
Function MySQL_Query(SQL As String, DataBase As String) As ADODB.recordset
Dim conConnection As New ADODB.Connection
Dim cmdCommand As New ADODB.Command
Dim rstRecordSet As New ADODB.recordset