182k views
0 votes
Hike Appalachia Molly and Bailey Johnson ask you to continue your work on the BlueRidge database by enhancing the frmGuestInfo form’s to increase its usability and improve its appearance. To help them with their request, complete the following steps:

The event procedure for the frmHikerInfo form to convert the Email field values to all lower case letters is not working correctly. Test the procedure, and fix the event procedure code to convert the Email field values to lower case letters. (Hint: Is there a standard module for the BlueRidge database containing the definition of the LowAll function? A proper name for this standard module would be basBlueRidgeProcedures. If not, you need to create one with the LowAll function.) Save your form changes, and then test the procedure.

1 Answer

5 votes

Final answer:

To fix the frmHikerInfo form, create the LowAll function in a standard module named basBlueRidgeProcedures if it's not present, then call this function in the Email field's event procedure code to convert email values to lower case.

Step-by-step explanation:

The correct answer is to create or modify the event procedure for the frmHikerInfo form to ensure that the email field value is converted to all lower case letters. If the BlueRidge database does not already have a standard module with a LowAll function defined, one should be created with the name basBlueRidgeProcedures. This function would be responsible for converting string values to lower case. The function can be called in the event procedure associated with the Email field, typically on the Before Update or After Update event.

For instance, the VBA code within the event procedure might look something like this:

Private Sub Email_AfterUpdate()
Me.Email.Value = LowAll(Me.Email.Value)
End Sub

In the scenario where the LowAll function does not exist, it can be defined within the newly created basBlueRidgeProcedures module:

Public Function LowAll(ByVal s As String) As String
LowAll = LCase(s)
End Function

After the function is available and the event procedure is fixed, the frmHikerInfo form changes should be saved, and the procedure should be tested to confirm that it is functioning correctly.

User Nat Naydenova
by
8.2k points