Microsoft
Software
Hardware
Network
Question : syntax error in FROM clause
Private Sub Calendar1_Click()
Text1.Text = Calendar1.Value
End Sub
Private Sub Calendar2_Click()
Text2.Text = Calendar2.Value
End Sub
Private Sub Command1_Click()
Adodc1.RecordSource = "SELECT qryVAT.InvoiceNo, qryVAT.SumOfAmount, qryVAT.exVAT, [exVAT]*0.12 AS VAT, qryVAT.DateDelivered From qryVAT WHERE [(((qryVAT.DateDelivered) Between #" & Text1.Text & "# And #" & Text2.Text & "#));"
Set DataGrid1.DataSource = Adodc1
Call Command2_Click
Set rptVAT.DataSource = Adodc1
With rptVAT
.Sections("section1").Cont
rols.Item(
"text1").D
ataField = "InvoiceNo"
.Sections("section1").Cont
rols.Item(
"text2").D
ataField = "SumofAmount"
.Sections("section1").Cont
rols.Item(
"text3").D
ataField = "exVAT"
.Sections("section1").Cont
rols.Item(
"text4").D
ataField = "VAT"
.Sections("section5").Cont
rols.Item(
"function1
").DataFie
ld = "SumofAmount"
.Sections("section5").Cont
rols.Item(
"function2
").DataFie
ld = "exVAT"
.Sections("section5").Cont
rols.Item(
"function3
").DataFie
ld = "VAT"
End With
rptVAT.Show
End Sub
Private Sub Command2_Click()
Adodc1.Refresh
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OL
EDB.4.0;Da
ta Source=D:\ROAInvent\databa
se\dbInven
t.mdb;Pers
ist Security Info=False"
Adodc1.CursorLocation = adUseClient
Text1.Text = Date
Text2.Text = Date
text4.AddItem "For Approval"
text4.AddItem "Issued"
adoDepartment.Recordset.Mo
veFirst
While Not adoDepartment.Recordset.EO
F
Text3.AddItem adoDepartment.Recordset.Fi
elds(0)
adoDepartment.Recordset.Mo
veNext
Wend
End Sub
here is the error
runtime error '-2147217900 (80040e14)
syntax error in FROM clause
Answer : syntax error in FROM clause
Your where clause has a [ in it. As far as I can see this should not be there.
regards
Marco
Random Solutions
outlook 2003 - pop3 email keep crashing
Development setup for PHP/MYSQL and ASP/MSSQL.
SQL Server 2005 Casting behaviour
Sending 'Test' Messages
Javascript removing all options not selected
Print 'Incomplete' for crystal report subtotal if any detail records are zero
Restoring information store Exchange 2003
How do i find all of the emails sent to a mail list in Exchange 2003
Help formating a output in Powershell
Domain account with read only permissions