I am working on a data entry form where many of the fields remain the same. I am looking to capture the value entered in each field and use that for the default value when I go to a new record.
I have the following code:
Private Sub Comments_AfterUpdate()
'declares a variable that will be used to set the
'default value
Dim strComments As String
'sets the variable equal to the current field
strComments = Forms![Software Assets]![Comments]
'sets the default value equal to the variable
Me![Comments].DefaultValue = strComments
End Sub
I am having trouble with some of the fields on the form coming back with "Name?" I have double checked, and have the correct names for each control. I also verified the data type.
One control is a text box, another is a combo box. I made sure that the combo box is retaining it's value.
Any other ideas?
I love deadlines. I especially like the wooshing sound they make as they fly by.
-Douglas Adams
I have the following code:
Private Sub Comments_AfterUpdate()
'declares a variable that will be used to set the
'default value
Dim strComments As String
'sets the variable equal to the current field
strComments = Forms![Software Assets]![Comments]
'sets the default value equal to the variable
Me![Comments].DefaultValue = strComments
End Sub
I am having trouble with some of the fields on the form coming back with "Name?" I have double checked, and have the correct names for each control. I also verified the data type.
One control is a text box, another is a combo box. I made sure that the combo box is retaining it's value.
Any other ideas?
I love deadlines. I especially like the wooshing sound they make as they fly by.
-Douglas Adams