473,406 Members | 2,620 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,406 software developers and data experts.

Need help displaying results of one query in command button

Hello all. Access 2003/Windows XP.

I have set up a command button where three queries are run. The first and last queries are select and the second is an update. I only want to display the results of the last query to the user. Can someone help me out? Here's the code.

Private Sub btn_Submit_Click()
On Error GoTo Err_btn_Submit_Click

Dim stDocName As String

stDocName = "qry_Submit1"
DoCmd.OpenQuery stDocName, acNormal, acEdit

DoCmd.SetWarnings False
stDocName = "qry_Submit2"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SetWarnings True

stDocName = "qry_Submit"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_btn_Submit_Click:
Exit Sub
Dec 4 '06 #1
2 1480
I figured it out...if I didn't have the table opened when I clicked on the command button I wouldn't need the third select query. Duh!
Dec 4 '06 #2
MMcCarthy
14,534 Expert Mod 8TB
I figured it out...if I didn't have the table opened when I clicked on the command button I wouldn't need the third select query. Duh!
It's always nice when posters figure these things out for themselves. :)

Mary
Dec 5 '06 #3

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

Similar topics

2
by: Mike Nau | last post by:
I'm using command center to view my data. When I enter a query on the interactive tab, once executed it takes me to the results tab but doesn't display anything. If I enter the same query in the...
2
by: Mark | last post by:
Hi all, I have a pop-up which has several command buttons which allow users to run a few stored query's. Having the query's displayed as report is not an option due to several reasons. My problem...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
12
by: sesling | last post by:
I have an unbound form (A). The form contains lists boxes that get information from different tables. When the form is opened the lists are populated with various bits of data. The operator will...
2
by: NasirMunir | last post by:
I have created a table in access (copied from excel). Then I created a form which contains a text field and a list box. The text field is actually a look-up field, where a user can enter a searchable...
1
by: dympna | last post by:
Hi I have created a form which is derived form a query the query has a prompt box which prompts the user to input the criteria they wish to see. I have worked out how to put a command button into...
7
by: Dave | last post by:
Hello All, These one may be a bit tricky, and what I'd like to do may not even be possible. I would love to hear any ideas you guys have for solving this. Here is the situation: I have a form...
3
by: Nightcrawler | last post by:
I have a website that does the following: 1. it accepts a keyword through a textbox in the UI 2. once the submit button is clicked it goes out and spiders a few websites using the keyword...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
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 project—planning, coding, testing,...
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...

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.