I was scolded on "Bytes" a couple of weeks back for writing all my own Save/Delete/Next etc buttons, so I have completely redone my main "Contacts" form using the button wizard. (I've also converted all the Macros to VBA so that I can more or less understand what they are actually doing!) Must admit this has cleaned things up a lot, but I have hit a problem ... as follows
There is an unbound "Find Contact" combo box on the form which lists all the Contact last names, where the user USED TO be able to pick a surname, and have that record appear on the form. There is code behind this which says "if the form isn't dirty, display new record for the name chosen". However, NOW this doesn't work because the action of choosing a name off the list "dirties" the form and Access won't move to a new record if the form is dirty. (If I take out the "If not dirty ..." bit of code, it just crashes - of course!)
I can think of some revolting possible ways around this, but it seems such an obvious sort of problem there's probably an obvious and simple solution which all you guys will know about????
There is an unbound "Find Contact" combo box on the form which lists all the Contact last names, where the user USED TO be able to pick a surname, and have that record appear on the form. There is code behind this which says "if the form isn't dirty, display new record for the name chosen". However, NOW this doesn't work because the action of choosing a name off the list "dirties" the form and Access won't move to a new record if the form is dirty. (If I take out the "If not dirty ..." bit of code, it just crashes - of course!)
I can think of some revolting possible ways around this, but it seems such an obvious sort of problem there's probably an obvious and simple solution which all you guys will know about????
Comment