Form with pop-up for additional info

  • Thread starter Thread starter epoh97 via AccessMonster.com
  • Start date Start date
E

epoh97 via AccessMonster.com

I want new form to pop up when the user presses "Other Info" button.

OtherInfo form will be related to the referring form by the club members
LastName and FirstName as field: vFullName on both forms.

How can I create this form?
 
Private Sub OtherInfo_Click()
On Error GoTo Err_OtherInfo_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "NameOfNewForm"
stLinkCriteria = "[vFullName]=" & Me![ vFullName]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OtherInfo_Click:
Exit Sub
End Sub

Oh yes – I have taken the space out of the button’s name and make it
OtherInfo (bit better as less likely to mess up)
 
OtherInfo form will be related to the referring form by the club members
Just thought. What if you have 2 John Smith's.
Instead of using a concencated field [LastName]&" "&[FirstName] why not just
use the [memberID] - or whatever you have called the primary key for the
members table.
You will need to have the ID field in both forms but it will work better for
longer (assuming that you members list will grow to include people with the
same 1st and 2nd names)

So

Private Sub OtherInfo_Click()
On Error GoTo Err_OtherInfo_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "NameOfNewForm"
stLinkCriteria = "[memberID]=" & Me![memberID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OtherInfo_Click:
Exit Sub
End Sub
--
Wayne
Manchester, England.



Wayne-I-M said:
Private Sub OtherInfo_Click()
On Error GoTo Err_OtherInfo_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "NameOfNewForm"
stLinkCriteria = "[vFullName]=" & Me![ vFullName]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OtherInfo_Click:
Exit Sub
End Sub

Oh yes – I have taken the space out of the button’s name and make it
OtherInfo (bit better as less likely to mess up)

--
Wayne
Manchester, England.



epoh97 via AccessMonster.com said:
I want new form to pop up when the user presses "Other Info" button.

OtherInfo form will be related to the referring form by the club members
LastName and FirstName as field: vFullName on both forms.

How can I create this form?
 
I like that idea. I will try out the pop up.

Wayne-I-M said:
Just thought. What if you have 2 John Smith's.
Instead of using a concencated field [LastName]&" "&[FirstName] why not just
use the [memberID] - or whatever you have called the primary key for the
members table.
You will need to have the ID field in both forms but it will work better for
longer (assuming that you members list will grow to include people with the
same 1st and 2nd names)

So

Private Sub OtherInfo_Click()
On Error GoTo Err_OtherInfo_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "NameOfNewForm"
stLinkCriteria = "[memberID]=" & Me![memberID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OtherInfo_Click:
Exit Sub
End Sub
Private Sub OtherInfo_Click()
On Error GoTo Err_OtherInfo_Click
[quoted text clipped - 16 lines]
 
Back
Top