Mcomerf1
12-03-2010, 10:10 AM
I am not sure how to do this but, if I am creating a table and if I put no in one field I want the next field to display N/A is this possible?
|
View Full Version : Getting a Field to Auto-Populate Mcomerf1 12-03-2010, 10:10 AM I am not sure how to do this but, if I am creating a table and if I put no in one field I want the next field to display N/A is this possible? John Big Booty 12-03-2010, 11:33 AM Welcome to the forum; Your your two fields are text fields use use something like the following in the After Update event of your first field; If Me.FirstFieldName = "No" Then Me.SecondFieldName = "N/A" End If If your first field is a check box then use the following in it's On Click event; If Me.YourCheckBox = 0 Then Me.SecondFieldName = "N/A" End If Mcomerf1 12-03-2010, 12:09 PM So, I tried this but it does not seem to be working. I must still me doing something wrong. Should I be putting this code in the imput mask? John Big Booty 12-03-2010, 12:18 PM OK, put your form in design view. Make sure that you have the properties window visible. Now click on the first control, in the properties window click on the Events tab, from the list click in the event appropriate to the type of control, as suggested in my previous post, select Event Procedure from the list, no click on small button with the three full stops on it (ellipsis), a code window will open that looks a little like; Private Sub ControlName_Click() End Sub Paste the appropriate code between the first line (Private Sub ControlName_Click()) and the last line (End Sub) making changes to the code so that the control name match those on your form. |