Solved

I want to open a table to specific records using a drop down box on the form

Posted on 2016-08-10
2
56 Views
Last Modified: 2016-08-17
I have a drop down box on a form that you select a client then I want to push a button that garbs those records in a table and displays them for editing.
The code im using is  

dim stLinkCriteria as string
stLinkCriteria = "[Client Name]=" & "'" & Me![SingleAcctName] & "'"
docmd.opentable "Structure", , stLinkCriteria

and Im getting a type mismatch

stLinkCriteria looks like this "[Client Name]='Home Depot'"
what am i doing wrong?
0
Comment
Question by:Stephen Roesner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 38

Accepted Solution

by:
PatHartman earned 500 total points
ID: 41750945
1. the OpenTable method does not support a where argument.
2. Never under any condition should users be presented with a raw table or query to update.  Always use a form.  Tables and queries do not have any event processing so there is no way for you to have any control over the data they enter.
3. If the user wants to edit in something that looks like a table, use a form in Data Sheet view.  When you use a DS form, it is generally best to make it a subform rather than a main form because a DS form does not support buttons or have a header or footer.  If you want to know how to make the subform work with criteria, post back.
0
 

Author Closing Comment

by:Stephen Roesner
ID: 41760195
Pat you are correct thats what I ended up doing
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question