M
Mike
Group
When I try to run the code below I get a "Compiler error: User-defined
type not defined" the compiler highlight the "Dim rst As DAO.Recordset"
portion of the code.
Private Sub cmdSubmit_Click()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("tblUserNameBothNetworkAndFriendly")
rst.Index = "PrimaryKey"
rst.AddNew
rst!strUserNetworkName = fOSUserName
rst!strComputerNetworkName = fOSMachineName
rst!strUserFirstName = txtFirstName
rst!strUserLastName = txtLastName
rst.Update
End Sub
Any ideas the book I'm using is "ACCESS 2002 VBA Handbook" from Novalis and
Jones. I see this DAO in every example of modifying or adding a record to a
table. The example that i'm modeling this from is found on page 777 on the
bottom of the page the title of the page is "Adding a Record"
Thanks Mike Sundman
mike(dot)sundman(at)ctd1.com
When I try to run the code below I get a "Compiler error: User-defined
type not defined" the compiler highlight the "Dim rst As DAO.Recordset"
portion of the code.
Private Sub cmdSubmit_Click()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("tblUserNameBothNetworkAndFriendly")
rst.Index = "PrimaryKey"
rst.AddNew
rst!strUserNetworkName = fOSUserName
rst!strComputerNetworkName = fOSMachineName
rst!strUserFirstName = txtFirstName
rst!strUserLastName = txtLastName
rst.Update
End Sub
Any ideas the book I'm using is "ACCESS 2002 VBA Handbook" from Novalis and
Jones. I see this DAO in every example of modifying or adding a record to a
table. The example that i'm modeling this from is found on page 777 on the
bottom of the page the title of the page is "Adding a Record"
Thanks Mike Sundman
mike(dot)sundman(at)ctd1.com