First, the top two lines in EVERY code module should be
Code:
Option Compare Database
Option Explicit
================================================== =============================
Next, your questions..
1. On form "MemberProfileFrm" I have a a DblClk and NotInList function on combo "CboEvent"
They work however, when I DblClick, it opens form,
but filters the form to that recrod. I dont want to filter
this? Also on the not in list event, it
opens form and criteria yet it also filters the form to that record. I
Dont want to filter that either, just call CmdAddEvent and allow all the recrods to be available.
You are causing the form to be filtered!
OK the "CboEvent" DblClk event. You have:
Code:
Private Sub CboEvent_DblClick(Cancel As Integer)
Dim LinkCriteria As String
LinkCriteria = "[EventName] = '" & Me!CboEvent.Text & "'"
DoCmd.OpenForm "EventFrm", , , LinkCriteria
End Sub
Here is the syntax of the "OpenForm" command:
expression.OpenForm(FormName, View, FilterName, WhereCondition, DataMode, WindowMode, OpenArgs)
The WHERE parameter is after the third comma.
Look at the code above in purple. What is after the third comma? Correct, it is the variable "LinkCriteria". And the variable "LinkCriteria" contains something like "[EventName] = 'Super Mario'".
How many records do you think will be returned? ONLY THE RECORDS WHERE EVENTNAME = Super Mario!!! There will be no other records in the record set for the form!
The Same thing is happening in the "Not In List Event" code!
-------------------------------------------------------------------------------------------------------
2. On the EventFrmOn the EventFrm i have a Combo at the bottom called "CboEventSearch" and if i type in a name that is not in the list
or that i mispelled, it give me a msgbox, OK and forces me to pick from list or i have to hit escape twice to get out of
it.
Build it like the "Not In List" event in form "MemberProfileFrm".
Code:
If x = vbYes Then
'Append the new value
Else
'do something else
End If
----------------------------------------------------------------------------------------------
3. EventFrm, i have a list box "MembersLst" and it to has a double click event, that opens MembersFrm and i have the same
issue with filters the form to that record. I dont want to filter the form, just go to that recrod and not filter it.
When I dblclk the list box, I get an error. (maybe because I added the Option Explicit command)
From the form "EventFrm", you open the form "MemberFrm", (filtered!), then you have code
Code:
With Me.RecordsetClone
.FindFirst "[MemberID]=" & tmp
If Not .NoMatch Then Me.Bookmark = .Bookmark
End With
The problem is "FindFirst" is trying to search the field "MemberID". BUT you are still in form "EventFrm", which does not have a field "MemberID" in the form record set.
I would try moving the close form command to just after the open form command.
Code:
Private Sub MemberLst_DblClick(Cancel As Integer)
Dim tmp As Long
tmp = Me![MemberLst].Column(2)
DoCmd.OpenForm "MemberFrm", , , "[MemberID]=" & tmp
DoCmd.Close acForm, "EventFrm" '<<-- moved to here
' Debug.Print Me.Name
With Me.RecordsetClone
.FindFirst "[MemberID]=" & tmp
If Not .NoMatch Then Me.Bookmark = .Bookmark
End With
End Sub