Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 30th, 2006, 03:39 PM
Registered User
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Any help out there?

Greetings all:

Any information you can provide to me would be greatly appreciated. Heres what I'm trying to do"

When a rep enters an account number (obtained from the customer) they enter it into a field and then must re-enter it to ensure it matches and is the correct number.

If the two numbers do not match, I need the system to populate an error message "Please reenter the account number. They do not match." See below the procedure -code I entered.

I need to attach this as a file in outlook.

I need all fields to be grayed (unchangeable) once the file is emailed except for one field. The processing teller number needs to be completed by the recipient of the email.

This is the event procedure I came up with...but its faulty:

O(Private Sub Re_Enter_Account_Number_AfterUpdate()
If Nz(Re_Enter_Account_Number, " ") = " " Then
    MsgBox ("Please reenter the account number.")
    Me.Re_Enter_Account_Number.SetFocus
End If
If Me.From_Account_Number = Me.Re_Enter_Account_Number Then
    Else: MsgBox ("Please reenter the account number. They do not match.")
End If
End Sub

See http://www.alamotechprep.org/temp/Untitled-1.htm for a screen shot.

One's for the debit side, and I will need one for the Credit side (see screen shot

Again, any help would be greatly appreciated.

ant...
 
Old April 3rd, 2006, 06:41 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

IS this form bound to a database, or unbound and floating out there somewhere? Can you get the account numbers and have them show up in a combo box so the filler can select the proper account number? Then you can show them the other customer info.

Is this to submit a new account?

I use a less sophisticated approach and do something like:

If IsNull(Re_Enter_Account_Number) Or Me.Re_Enter_Account_Number = "" Then...

Also this line:
If Me.From_Account_Number = Me.Re_Enter_Account_Number Then

should be:
If Me.From_Account_Number <> Me.Re_Enter_Account_Number Then

HTH

mmcdonal









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.