Open a form with specific records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a button that opens a form with certain records:

DoCmd.OpenForm stDocName, , , stLinkCriteria

The where condition is determined by different values from a record, however
it is often too long and the end part gets cut off. Any suggestions on what I
can do.
 
The maximum length of the wherecondition argument is 32,768 characters. Are
you exceeding this? If so, you may need to base the form on a query and
rewrite the SQL of the query before opening the form. Another option would
be to use a temporary table linked to the main table in the query based on
the field that you want to filter on. Add the values you want to see to the
field in this temporary table. The link will cause only the records that
have matching values in the main table to be displayed.
 
ok there is no way that I am exceeding that. It must be an error somewhere
else. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top