Solved

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

Posted on 2016-08-10
2
44 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:Grizbear51
2 Comments
 
LVL 35

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:Grizbear51
ID: 41760195
Pat you are correct thats what I ended up doing
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

772 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