473,513 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Code : DoCmd.OpenQuery - and bring result back to form front

I have got this little piece of code that fires on exit of a text box.
It run's my query perfectly based of my form input. But I don't know
how to bring result in my query back to a text box on my form, and
shut down query so I can keep using my form again. Thoughts?

I am getting a little freaked, I am sure this must be easy?

form is; frm_RR_datacapture
query is;qprGB_Piece_SizefromTextBox
textbox is;RR_Adjusted_GB_Piece_Size_Production_Adjustment
Private Sub RR_Adjusted_GB_Piece_Size_Production_Adjustment_ex it(Cancel
As Integer)
DoCmd.OpenQuery "qprGB_Piece_SizefromTextBox"

End Sub

Cheers
Nov 13 '05 #1
2 5374
ty**********@hotmail.com (Tyson) wrote in message news:<7f*************************@posting.google.c om>...
I have got this little piece of code that fires on exit of a text box.
It run's my query perfectly based of my form input. But I don't know
how to bring result in my query back to a text box on my form, and
shut down query so I can keep using my form again. Thoughts?

I am getting a little freaked, I am sure this must be easy?

form is; frm_RR_datacapture
query is;qprGB_Piece_SizefromTextBox
textbox is;RR_Adjusted_GB_Piece_Size_Production_Adjustment
Private Sub RR_Adjusted_GB_Piece_Size_Production_Adjustment_ex it(Cancel
As Integer)
DoCmd.OpenQuery "qprGB_Piece_SizefromTextBox"

End Sub

Cheers


Hmm... one way is to create an unbound subform and assign the
recordsource to the query and then bind the subform the the query at
runtime...
Nov 13 '05 #2
pi********@hotmail.com (Pieter Linden) wrote in message news:<bf**************************@posting.google. com>...
ty**********@hotmail.com (Tyson) wrote in message news:<7f*************************@posting.google.c om>...
I have got this little piece of code that fires on exit of a text box.
It run's my query perfectly based of my form input. But I don't know
how to bring result in my query back to a text box on my form, and
shut down query so I can keep using my form again. Thoughts?

I am getting a little freaked, I am sure this must be easy?

form is; frm_RR_datacapture
query is;qprGB_Piece_SizefromTextBox
textbox is;RR_Adjusted_GB_Piece_Size_Production_Adjustment
Private Sub RR_Adjusted_GB_Piece_Size_Production_Adjustment_ex it(Cancel
As Integer)
DoCmd.OpenQuery "qprGB_Piece_SizefromTextBox"

End Sub

Cheers


Hmm... one way is to create an unbound subform and assign the
recordsource to the query and then bind the subform the the query at
runtime...

Hi, Thanks...

Is there anyway I can do it without a subform so it is all run from
the one main form?

Option 1; I was thinking i would like to add a little code after the
Open.query statement above to bring it back to a text box?

Option 2; The other thought I had was a Dlookup but have tried that
and it doesn't seem to work? could it be a text thing?

I like option 1, but do not have the skill base to write code to do
this? Would you be able to help?

Sorry about the length of the names here!!!!

form is; frm_RR_datacapture
table is; tbl_GB_Piece_Size
query is;qprGB_Piece_SizefromTextBox
textbox is;RR_Adjusted_GB_Piece_Size_Production_Adjustment
Lookup Column is Piece_Size
Column I am wanting a return value from is called :
Production_Adjustment

I hope this helps, I am really stuck...

Thanks
Tys.
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
13263
by: NB | last post by:
Hi Is there any way to call up the query design view from code? In my compiled-as-MDE app everything is hidden from end users. However, I want advanced user to have access to the query design...
2
3154
by: Stu | last post by:
Hi, I've been working on trying to use a combo box to filter my records for a while now, and can't get it to work. Right now, I have SQL code written into IfThen statements on the afterupdate for...
1
3194
by: Eric | last post by:
When I run my script it gives error on the following line: strEmail = Right(strEmail, (Len(strEmail) - 1)) I enclose my code and the sample text file too Thanks,...
3
9490
by: jpr | last post by:
Hello, I have a form on which I have a cmdbutton to copy a couple of fields into another table (MASTER) using the SSN on the active form as criteria. In the active form (based on a tables...
7
2938
by: ApexData | last post by:
Hello I currently Link the FE/BE using the LinkTables Option and the Linked Table Manager. Any time I need to move the BE to another location, I have to go through this process over again. I...
3
1675
matrekz42
by: matrekz42 | last post by:
Good morning folks, I have a progress bar in a form, and I would like to run the code for the progress bar through a Macro, so after each query finishes running, the bar will change. Is this...
0
2029
by: emalcolm_FLA | last post by:
Hello and TIA for any help with this non profit Christmas assistance project. I have an applicant (app history) and child (child history) tables (4 total). I need to grab the next available (in...
10
7590
by: teddysnips | last post by:
My clients have asked me to maintain a database that was developed in- house. It's pretty good, considering the developer isn't a "programmer". The first thing they want me to do is to split it...
3
1728
by: lukethegooner | last post by:
I can't see the wood for the tree's here, I have some code set up to run through a bunch of delete queries, re-append fresh information to local DB tables then run a report. But in the code below...
0
7543
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
7106
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
7534
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...
1
5094
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
4749
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
3236
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
1601
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 ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
459
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.