Microsoft Access 2k and SQL2k.
Dear all,
I have to make some amendments to an Access front-end, created by a now departed colleague. Basically it is a series of forms that allows users within my company to enter information into a "temporary" holding table in Access. This information is then pushed into a SQL table when the user finally clicks the save button. The method to get the data into SQL is as below.
In this case, the first four items were present before I got my hands on this, they are the columns from the temporary Access table. I just had to add the last one "MyNewItem1". EASY! but...
I created the new column on both the SQL and Access tables. I created a new text box on my form and set its control source to the new Access column. When I enter data into this new text box, it goes into my access table - all well and good so far. All I need to do is add this to my connection string as in my code above. But the VB editor won't seem to recognise it, it does not appear as a member of the form in the object browser as the others do. I can reference the name of the text box instead in the connection string, and it works fine all the way up to and including populating SQL. But I would prefer if the control source was referenced as with all the other parameters.
I am not that familiar with Access, is there something obviously wrong that I am doing?
Thanks in advance
mrees
Dear all,
I have to make some amendments to an Access front-end, created by a now departed colleague. Basically it is a series of forms that allows users within my company to enter information into a "temporary" holding table in Access. This information is then pushed into a SQL table when the user finally clicks the save button. The method to get the data into SQL is as below.
Code:
Global cnn As New ADODB.Connection
Global rs As New ADODB.Recordset
Global Provstr As String
cnn.Provider = "sqloledb"
Provstr = "Server=MyServer;Database=MyDbase;Trusted_Connection=yes"
ADODBConnect.ADOBCOnnect
cnn.Open Provstr
cnn.saddcomp2 Item1,Item2,Item3,Item4,MyNewItem1,rs
cnn.Close
Set cnn = Nothing
I created the new column on both the SQL and Access tables. I created a new text box on my form and set its control source to the new Access column. When I enter data into this new text box, it goes into my access table - all well and good so far. All I need to do is add this to my connection string as in my code above. But the VB editor won't seem to recognise it, it does not appear as a member of the form in the object browser as the others do. I can reference the name of the text box instead in the connection string, and it works fine all the way up to and including populating SQL. But I would prefer if the control source was referenced as with all the other parameters.
I am not that familiar with Access, is there something obviously wrong that I am doing?
Thanks in advance
mrees