Opening Forms in 2 Views

Graybeard

Registered User.
Local time
Today, 13:31
Joined
Aug 7, 2004
Messages
64
I have a form that is coded to open in add record mode. However, sometimes the user will be editing an existing record. To accomplish that purpose I have a combobox that allows the user to select the record they wish to edit. I want to warn to the user not to use the combobox unless they are editing an exising record but am not sure of the best way to do this. Can anyone help?
 
How about setting the combo box visible property to False and having a cmd button on the form, which says 'Edit Record' or something similar, after pressing the cmd button, the combo box then has its' visible property set to True.

Or on the On Click event of the combo box, put a msgbox asking the user if they want to edit an existing record, if they select 'Yes' use the combo box, if they select 'No' then set the visible property of the combo box to False.
 
Thats the obvious solution but my personal preference is to avoid command buttons and automate with code whereever possible (even hough I am new and just learning code. Right now I am playing with a form in dialogue mode that opens in the onload event and warns the user to only use the combobox if they are editing a record. I have a second command on the ontimer event that closes the warning form and I set the timing interval to 10 seconds. If anyone has a better solution please let me know.
 

Users who are viewing this thread

Back
Top Bottom