473,503 Members | 1,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why does my run query command button not work?

1 New Member
I am trying to run a query from a form using a "run query" coomand button. The query fails to run, though it does open. The run query button works from the the design view of the query, but not from the linked form. How can I get the button to run the query?
Dec 16 '19 #1
2 1230
twinnyfo
3,653 Recognized Expert Moderator Specialist
sanguma97,

Welcome to Bytes!

Unfortunately you will have to provide us a bit more information.

Please provide the VBA code you are using and any additional information about the query that might be helpful. Also, if you are getting any error messages, this would also be helpful.

Thank you!
Dec 16 '19 #2
cactusdata
214 Recognized Expert New Member
"Run query" is for action queries.
It sounds like you try to open a select query. So, use
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenQuery
for that.
Dec 17 '19 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

13
4734
by: Samantha Smit | last post by:
Hi, I am trying to create a simple asp page that has one command button that updates a database. The URL of the page is like this: http://MyServer.com/Update.asp?UserName=Tom My asp code is...
2
2230
by: gbb0330 | last post by:
hi all first i would like to thank PC Datasheet, i got so far because of him/her i need some help again i have this command button the on-click event procedure is
2
5604
by: Darren | last post by:
Hi, I have a command button which has a macro running in it. The macro on the click event, runs to ensure that certain values in a form are valid, (e.g. the textboxes are not null) and...
4
4781
by: John Smith | last post by:
I have a continuous form. there is a command button with the following code for the OnClick event: DoCmd.OpenForm "frmPlants", , , "PlantsID =" & Me!PlantsID I click the button and frmPlants...
3
3448
by: chris | last post by:
I have a form det-up as a continous form. In the Header of the form I have a command button called "Approve". What I'm looking to do is when the user clicks the command button all of the records...
15
1987
by: mforema | last post by:
Hey Everybody, I have code for a command button. The button is supposed to open a query with a general criteria of: Forms!!. The field of the query should match the in the Form. If a record...
7
6504
by: pushrodengine via AccessMonster.com | last post by:
I have a command button “AddIncident”. I would like to make it so that it will not add the record to the database if textbox “Type” is empty. I also would like to add a message that will...
2
1734
by: zillou32 | last post by:
Hi guy, my question is as follows, am currently working on an excel sheet and need to add a vb command button. the action of this button is to to sent the sheet by mail (outlook). the command...
1
1504
by: Barne6ae | last post by:
Currently have a Multiple Field (from 4 fields or is Null, txtFiscalYear, cboUnit, cboItem, cboStore) search form that user can use to query and pull data. When user click on a query button the...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7441
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5558
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.