Hello everyone.
I have a small problem. Lack of creativity.
I have a small (personal) database.
In the development of user forms I have imagined that the "LOCATION" form of the "ADD_" button opens the auxiliary form "SAMPLE".
In this auxiliary form is a field "CBox_ID_LOCATION" (drop down menu) that has more values.
I suppose I would have to type the code in the main form to run this action.
'Private Sub Command_ADD_SAMPLE_Click ()
DoCmd.OpenForm "edit_SAMPLE", acNormal,,, acFormAdd, acDialog, "Add sample ...."
Me.Form '.Form & "edit_SAMPLE" & CB_ID_LOCATION.DefaultValue = 2
End Sub
But that code does not work
You got a better idea
I have a small problem. Lack of creativity.
I have a small (personal) database.
In the development of user forms I have imagined that the "LOCATION" form of the "ADD_" button opens the auxiliary form "SAMPLE".
In this auxiliary form is a field "CBox_ID_LOCATION" (drop down menu) that has more values.
I suppose I would have to type the code in the main form to run this action.
'Private Sub Command_ADD_SAMPLE_Click ()
DoCmd.OpenForm "edit_SAMPLE", acNormal,,, acFormAdd, acDialog, "Add sample ...."
Me.Form '.Form & "edit_SAMPLE" & CB_ID_LOCATION.DefaultValue = 2
End Sub
But that code does not work
You got a better idea