J
jez_s
I am still quite new to Access and don't really know any VBA code so I
hope someone might be able to help with this.
I have two forms, each based on queries from the same table,
tblClients. One is a continuous form showing a few details about
clients, including ClientID, ClientName, DateReferred, and so on. The
other form has more detailed information in single form mode, and
shows the same fields (ClientID, etc.) but also several additional
ones.
I wanted to make a command button at the end of each row in the
continuous form that will pop open the detailed form showing the data
from that particular record. I used the command button wizard to do
this and it does open the form, but it doesn't display any data. It
says "Filtered" at the bottom, but the form is totally blank.
Here's what the wizard created for the code:
Private Sub OpenClientDetail_Click()
On Error GoTo Err_OpenClientDetail_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "F-Clients"
stLinkCriteria = "[ClientID]=" & Me![ClientID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenClientDetail_Click:
Exit Sub
Any ideas as to why this is not working?
Thanks in advance
--SJ
hope someone might be able to help with this.
I have two forms, each based on queries from the same table,
tblClients. One is a continuous form showing a few details about
clients, including ClientID, ClientName, DateReferred, and so on. The
other form has more detailed information in single form mode, and
shows the same fields (ClientID, etc.) but also several additional
ones.
I wanted to make a command button at the end of each row in the
continuous form that will pop open the detailed form showing the data
from that particular record. I used the command button wizard to do
this and it does open the form, but it doesn't display any data. It
says "Filtered" at the bottom, but the form is totally blank.
Here's what the wizard created for the code:
Private Sub OpenClientDetail_Click()
On Error GoTo Err_OpenClientDetail_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "F-Clients"
stLinkCriteria = "[ClientID]=" & Me![ClientID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenClientDetail_Click:
Exit Sub
Any ideas as to why this is not working?
Thanks in advance
--SJ