Hello, I have code like this in my module:
Cnct = "Provider=Microsoft.Jet.OLEDB.4.0;"
Cnct = Cnct & "Data Source=" & DBFullName & ";"
Connection.Open ConnectionString:=Cnct
Set Command = New ADODB.Command
Command.ActiveConnection = Connection
'Insert records into Work_Data table
Command.CommandText = "INSERT INTO Work_Data " & _
"VALUES (@Team,@Case_Owner,@Date,@Week_Beginning,@HO_Ref,@Finished_Work)"
For Each rngDate In Union(Range("Mon_Date_Data"), Range("Tue_Date_Data"), Range("Wed_Date_Data"), Range("Thu_Date_Data"), Range("Fri_Date_Data"))
For Each rngHORef In Range(rngDate.Offset(9, -1), rngDate.Offset(23, -1))
If rngHORef <> "" Then
With Command
.Parameters.Append .CreateParameter("@Team", adVarChar, adParamInput, Len(Range("Team").Value), Range("Team").Value)
Please can you suggest books and or other training material to learn about connecting and coding for accessing the database?
Cnct = "Provider=Microsoft.Jet.OLEDB.4.0;"
Cnct = Cnct & "Data Source=" & DBFullName & ";"
Connection.Open ConnectionString:=Cnct
Set Command = New ADODB.Command
Command.ActiveConnection = Connection
'Insert records into Work_Data table
Command.CommandText = "INSERT INTO Work_Data " & _
"VALUES (@Team,@Case_Owner,@Date,@Week_Beginning,@HO_Ref,@Finished_Work)"
For Each rngDate In Union(Range("Mon_Date_Data"), Range("Tue_Date_Data"), Range("Wed_Date_Data"), Range("Thu_Date_Data"), Range("Fri_Date_Data"))
For Each rngHORef In Range(rngDate.Offset(9, -1), rngDate.Offset(23, -1))
If rngHORef <> "" Then
With Command
.Parameters.Append .CreateParameter("@Team", adVarChar, adParamInput, Len(Range("Team").Value), Range("Team").Value)
Please can you suggest books and or other training material to learn about connecting and coding for accessing the database?