|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi every Body
I am trying to make a Program, I am using SQL Server as my Data Base and I am Using Microsoft Access in order to make my Forms and Reports. Here is the question: I want to use DAO Recordset in order to Enter some Data from a Form to a Table which is not related to my Form. I know how to this in Access, But Apparently it is a little different when I am using SQL Server. This is how I will do it in Access: In VB Editor I go to Tools>References> and Chose the Microsoft DAO 3.6 Object Library. Then I have created a command button on the Installer Form to Save the new record and then copy that information over to a History table with the InstallerID and InstallerName Fields already created. Is this correct? Private Sub Save_Installer_Click() On Error GoTo Err_Save_Installer_Click Dim r2 As DAO.Recordset DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 Set r2 = CurrentDb.OpenRecordsets("History") r2.AddNew r2("InstallerID") = Me.InstallerID r2("InstallerName") = Me.InstallerName r2.Update r2.Close Exit_Save_Installer_Click: Exit Sub Err_Save_Installer_Click: MsgBox Err.Description Resume Exit_Save_Installer_Click It works in Access, But It Does not If I am using SQL Server as my Data Base, Could you tell me why? I think it has to do of choosing the right Option in Tools>References. Best Regards Bijan |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > Recrdset |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|