In Expert 2 Lesson 4 we created a customer combo for contact form.BUT when I change the customer combo box this modifies who this entry is about. This issue was raised in comments for Expert2 Lesson4 and answer suggested by Alex was to set the locked property to YES. That works fine but now I cannot select a customer for new contact calls received because that is locked. How can I permit selection of customer without asigning any existing call to another customer please? Thanks.
Patricia TongeOP
@Reply 3 years ago
Further to my previous post - would the answer be to enable popup and modal properties for the form? Sorry if I am being dense and my questions seem silly.
Kevin Robertson
@Reply 3 years ago
You could ask your users if they are sure they want to change the customer in the Before Update event.
Similar to this:
Private Sub cboCustomers_BeforeUpdate(Cancel As Integer)
If Not Me.NewRecord Then
If MsgBox("This will change the customer. Are you sure?", _
vbYesNoCancel + vbQuestion, "Change Customer") <> vbYes Then
Cancel = True
cboCustomers.Undo
End If
End If
End Sub
Or you could require them to enter a password: see the Simple Security video to see how to do this.
Patricia TongeOP
@Reply 3 years ago
Thank you Kevin. I am a novice and I have not yet used Before Update events and also only used a very little amount of code whilst following the lessons. To be honest it was a case of monkey see, monkey do I'm afraid. I followed Richard's video instructions to the letter. When I get a bit further into the course I will come back to your advice here and think about it some more. In the meantime thanks again for your reply.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 3.