473,441 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,441 software developers and data experts.

why does my run query command button not work?

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 1227
twinnyfo
3,653 Expert Mod 2GB
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 Expert 128KB
"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
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
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
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
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
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
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
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
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.