I am extremely new and trying to teach myself Access. I've created a form called New Call with several fields and added a button that says, "New Record." I thought I could just do a macro to get the form to blank out and accept input when the user hit the button but there's no method on the list for an action to add a new record.
So I went into visual basic and I'm not having much luck.
All I want is when the user hits the New Record button, the form clears and the user will enter the information into the text boxes and hit update or enter or something and it adds a record to the database.
Here's what I've used so far:
But it doesn't work.
So I went into visual basic and I'm not having much luck.
All I want is when the user hits the New Record button, the form clears and the user will enter the information into the text boxes and hit update or enter or something and it adds a record to the database.
Here's what I've used so far:
Private Sub NewRecord_Click()
Set Varset = CurrentDb.OpenRecordset("Select Tracking.* FROM Level2;", 2)
Varset.AddNew
Varset!Call_Type = Me![Call Type]
Varset!Call_Date = Me![Date]
Varset!UW_Name = Me![UW Name]
Varset!Agt_Name = Me![Agt Name]
Varset!Agt_Number = Me![Agt Number]
Varset!Quote_Number = Me![Quote Number]
Varset!LOB = Me![LOB]
Varset!Notes = Me![Notes]
Varset.Update
End Sub
But it doesn't work.