I am getting the following error when my table name contains spaces. (Maybe spaces in table names are not supported, but if that is the case, why can I create tables with spaces in their name?)
AdodcInput (My Adodc control)
The Microsoft Jet Database Engine cannot find the input table or query 'C1INtwo'
it should actually be 'C1INtwo part'
I have created a msgbox to test the string and the msgbox displays it properly.
Anyway, here is code: Form name is frmNewProduct2, using vb6
Private Sub Form_Load()
Dim prodcode
Label2.Caption = "Enter in your Input Requirements. Eg Length, Width etc."
AdodcInputs.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\products.mdb"
prodcode = frmNewProduct1.txtProductIDInput.Text
catagory = frmNewProduct1.txtcatagory
txtcat.Text = catagory
MsgBox "SELECT InputName FROM " & catagory & "IN" & prodcode
AdodcInputs.RecordSource = "SELECT InputName FROM " & catagory & "IN" & prodcode
Set DGInputs.DataSource = AdodcInputs
Unload frmNewProduct1
Me.Tag = prodcode
End Sub
Enter your message below
Sign in or Join us (it's free).