Im using a simple Access Database with so there is no back end, the table are part of the front end
i have a button to run this code
Expand|Select|Wrap|Line Numbers
- Private Sub Command0_Click()
- Dim oRS As ADODB.Recordset
- Dim DSN As String
- Dim connection
- Dim sql, sconstring
- DSN = "TEST"
- sql = "SELECT LineTypeID FROM SaleLines"
- sconstring = "Driver:={MYOB ODBC};DSN=" & DSN & ";"
- Set connection = CreateObject("ADODB.Connection")
- connection.Open (sconstring)
- Set oRS = connection.Execute(sql)
- While Not oRS.EOF
- DoCmd.RunSQL "INSERT into Test (LineTypeID) VALUES(" & oRS("LineTypeID") & ")"
- oRS.MoveNext
- Wend
- MsgBox "Completed"
- End Sub
and a D in the grey area above the input field. the actual value of LineTypeID is D, and i want this inserted into the table, but the input box appears. Does anybody know why it does this and more importantly, how to make it work properly???
This is really a pain, to insert this way, if someone know how to use bulkinsert from from MYOB that would help healp