I'm having trouble setting up my first macro.
I'm trying to create a form where certain controls are displayed or hidden based on a value in another control. Access's help file suggested I should use a macro if possible. After scanning through a few books and web pages I thought I had the right structure:
Users will select one of the following values: "LOCAL"; "MORE"; "OCLC"; "UNFILLED" from a combo box named LoanType. The control LocalLender has its Visible property set at No to start with. I want it to change to Yes when LOCAL is selected from the list. Both fields are text fields.
I clicked in the On Change property for this combo box and chose the Macro Builder. This is the expression:
IF [Forms]![ILL Requests Form]![LoanType]="LOCAL" Then
SetProperty
Control Name [Forms]![ILL Requests Form]![LocalLender]
Property Visible
Value Yes
When I try to run this macro, Access gives me a Type Mismatch error. Once I get this part working, I want to make other controls visible when other values are chosen from the LoanType box. I would appreciate any help you can give!