By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,130 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.

On Not In List

P: n/a
I have a fundraising database for an organization. Donations come in from
current members anad are found by using a combo box. If the member is found,
the After Update macro switches to another form where the donation is
entered.

The problem is that if the donor is not a member, the On Not in List macro
won't work for me bringing up a form with a new member number and all the
fields that have to be filled out.

I guess that the After Update property and On Not In List property conflict.
Any workaround?

Thanks in advance.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
news.bellatlantic.net wrote:
The problem is that if the donor is not a member, the On Not in List macro
won't work for me bringing up a form with a new member number and all the
fields that have to be filled out.

I guess that the After Update property and On Not In List property conflict.
Any workaround?


I don't remember that as a conflict.
NotInList fires only if you have set LimitToList to True.

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #2

P: n/a
On Sun, 08 Feb 2004 16:10:47 GMT, news.bellatlantic.net wrote:
I have a fundraising database for an organization. Donations come in from
current members anad are found by using a combo box. If the member is found,
the After Update macro switches to another form where the donation is
entered.

The problem is that if the donor is not a member, the On Not in List macro
won't work for me bringing up a form with a new member number and all the
fields that have to be filled out.

I guess that the After Update property and On Not In List property conflict.
Any workaround?

Thanks in advance.

Here is one method to open a form.

Code the Combo's NotInList event like this:

MsgBox "Double-click this field to add an entry to the list.", , "Not
In List"
Response = acDataErrContinue
====
Next code the combo's Double-click event:

' Note: Change MemberID to whatever the actual name
' of your Combo Box is. Change "frmMembership" to whatever the actual
form name is.

On Error GoTo Err_MemberID_DblClick
Dim lngMemberID As Long

If IsNull(Me![MemberID]) Then
Me![MemberID].Text = ""
Else
lngMemberID = Me![MemberID]
Me![MemberID] = Null
End If
DoCmd.OpenForm "frmMembership", , , , , acDialog, "GoToNew"
Me![MemberID].Requery

If lngMemberID <> 0 Then Me![MemberID] = lngMemberID

Exit_MemberID_DblClick:
Exit Sub
Err_MemberID_DblClick:
MsgBox "Error #: " & Err.Number & " " & Err.Description, ,
Me.Name
Resume Exit_MemberID_DblClick
====
Then code the frmMembership Load event:

If Me.OpenArgs = "GotoNew" And Not IsNull(Me![MemberID]) Then
DoCmd.RunCommand acCmdRecordsGoToNew
End If
====

When you enter a name into the combo box that is not in the list, a
message will appear to double-click the control if the user wishes to
add the name. Double-clicking the Combo Box will open the
frmMembership form to a new record for data entry.
Close the form when done, and the new name will appear in the combo
box.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 12 '05 #3

P: n/a
On Sun, 08 Feb 2004 18:05:25 +0100 in comp.databases.ms-access, Bas
Cost Budde <ba*@heuveltop.org> wrote:
news.bellatlantic.net wrote:
The problem is that if the donor is not a member, the On Not in List macro
won't work for me bringing up a form with a new member number and all the
fields that have to be filled out.

I guess that the After Update property and On Not In List property conflict.
Any workaround?


I don't remember that as a conflict.
NotInList fires only if you have set LimitToList to True.


Or the bound column is hidden, which will imply LimitToList=True
regardless of the design time setting :-)

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.