Run-time error 3141 PLS HELP 
Author Message
 Run-time error 3141 PLS HELP

I'm trying to modify form code for a new index. Why I get
to the Select area, I'm getting "Run-time error 3141, the
SELECT statement includes a reserved word or an
argument name that is misspelled or missing, or the
punctuatin is incorrect."

The code so far is.

Option Compare Database

Private Sub cmdGenerate_Click()
  Dim dbs As DAO.Database
  Dim rst As DAO.Recordset, rstOM As DAO.Recordset,
rstType As DAO.Recordset
  Dim qryDef As String, totalrec As String, msg As
String
  Dim x As Integer

  If cboCountry >= 0 Then
    DoCmd.RunSQL ("delete * from Org_Geo")

    DoCmd.SetWarnings False

    Set dbs = CurrentDb

    Set rstOM = dbs.OpenRecordset("SELECT
OrgMaster.OrgId, OrgMaster.OrgName,
OrgMaster.State, " & _
                       "OrgMaster.ProvinceId,
OrgMaster.CountryId, " & _
                       "FROM Lkcountry RIGHT JOIN (Lkstate
INNER JOIN OrgMaster ON Lkstate.State =
OrgMaster.State) " & _
                       "ON OrgMaster.CountryId =
Lkcountry.CountryId WHERE Lkcountry.CountryId = " &
cboCountry & _
                       " ORDER BY OrgName", dbOpenDynaset)
    Set rstType = dbs.OpenRecordset("Select
count(orgid) as totalrec from orgmaster where State =
" & cboCountry, dbOpenDynaset)
    totalrec = CStr(rstType!totalrec)
    x = 1
    txtmsg.Visible = True

Any help, please, appreciated.

Max



Sat, 30 Apr 2005 05:37:19 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Pls HELP!! Run-Time Error 6

2. Microsoft Visual C++ Run time library Run time error R6025

3. Microsoft Visual C++ Run time library Run time error R6025

4. HELP : Error 91 : Run-Time Error 91 Object Variable or With

5. HELP "Run-time error 432" HELP

6. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

7. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

8. Run-Time Error 2486 - Can't Carry Out Operation at Present Time

9. hWnd Property Help Example gives Run-time error 2475 in Access but not in VB6

10. Run-Time Error 3197 - please help its driving me insane

11. HELP ASAP: Run-time error 2486 Access2000

12. Help with handling a run-time error in a macro

 

 
Powered by phpBB® Forum Software