cannot filter continuous form data

  • Thread starter Thread starter DubboPete
  • Start date Start date
D

DubboPete

Hi all,

On a continuous form, I have a command button that opens up a new form
with the linked data from the previous form. So it appears next to
every record, with the purpose of filtering that record and displaying
it on the subsequent form in muchh greater detail. Except it's only
ever opening up the first record in the table, not the one that's
linked...

Any clues anyone?

Here's the code:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "FrmCallContacts2"

stLinkCriteria = "[CallID]=" & Me![CallID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

thanks in anticipation everyone!

Pete
 
That often means that the CallID on the continuous form can't be found in
the record source for the linked form.
Check the record source for the linked form, see if it has the correct
query.
You can also debug your code to see what value for CallID is being picked up
from the coninuous form - perhaps it is finding Null for CallID.
This would also make the linked form open at the first record.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
That often means that the CallID on the continuous form can't be found in
the record source for the linked form.
Check the record source for the linked form, see if it has the correct
query.
You can also debug your code to see what value for CallID is being pickedup
from the coninuous form - perhaps it is finding Null for CallID.
This would also make the linked form open at the first record.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia




On a continuous form, I have a command button that opens up a new form
with the linked data from the previous form.   So it appears next to
every record, with the purpose of filtering that record and displaying
it on the subsequent form in muchh greater detail.   Except it's only
ever opening up the first record in the table, not the one that's
linked...
Any clues anyone?
Here's the code:
   Dim stDocName As String
   Dim stLinkCriteria As String
   stDocName = "FrmCallContacts2"
   stLinkCriteria = "[CallID]=" & Me![CallID]
   DoCmd.OpenForm stDocName, , , stLinkCriteria
thanks in anticipation everyone!
Pete- Hide quoted text -

- Show quoted text -

Thanks Jeanette

Couldn't get it to fwork no matter what, so I built a new command
button, and that worked!
Dontcha just love this Access?

Pete
 
Back
Top