SQL Error

Page 1 of 1

1 Replies - 290 Views - Last Post: 01 March 2011 - 12:12 AM Rate Topic: -----

#1 nelvash.exe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 19-February 11

SQL Error

Posted 01 March 2011 - 12:09 AM

Hi guys!

I just want to have solution on this problem I encounter on my SQL Statement. Code below:

If frmReport.cboInventory.Text = "Monthly Reports" Then
Dim rpt4 As rptInventory
Set rpt4 = rptInventory
rpt4.daoInventory.DatabaseName = "database.mdb"

rpt4.daoInventory.RecordSource = "Select * from tblInvoice, tblProduct where pmonth='" & frmDateInventory.txtMonth.Text & "' and pyear='" & frmDateInventory.cboYear.Text & "'"

rptInventory.Sections("PageHeader").Controls.Item("lblHeader").Caption = "MONTHLY INVENTORY REPORT"
rptInventory.Sections("ReportFooter").Controls.Item("lblTotal").Caption = lblTotal
rpt4.Show


on my code, I use database named as "database" and I wish to access two table named as tblInvoice, tblProduct both table have the same field name (pmonth, pyear). This two fields must be equal to the txtMonth for pmonth and txtYear for cboYear and will show results. My problem is that it never generate any results. Surely because of the SQL Statement I use

Any help is much appreciated!

Is This A Good Question/Topic? 0
  • +

Replies To: SQL Error

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10467
  • View blog
  • Posts: 38,799
  • Joined: 27-December 08

Re: SQL Error

Posted 01 March 2011 - 12:12 AM

Duplicate thread closed. Please avoid duplicate posting.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1