Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 02-14-2019, 05:18 AM   #1
jjake
Newly Registered User
 
Join Date: Oct 2015
Location: Texas, USA
Posts: 287
Thanks: 76
Thanked 0 Times in 0 Posts
jjake is on a distinguished road
Using a query result on a form's text box

Hi,

I'm using the following query to display total completion % for a project.

Code:
SELECT qryProjectSubSubTaskTotalCount.ProjectSubTaskID, qryProjectSubSubTaskTotalCount.TotalTasks, qryPRojectSubSubTaskCompleteCount.CountOfActualCompletionDate, [CountOfActualCompletionDate]/[TotalTasks] AS TotalPercentage
FROM qryPRojectSubSubTaskCompleteCount RIGHT JOIN qryProjectSubSubTaskTotalCount ON qryPRojectSubSubTaskCompleteCount.ProjectSubTaskID = qryProjectSubSubTaskTotalCount.ProjectSubTaskID;
How would i include this in my forms to show the value for those records in a text box? please see the attached image.
Attached Images
File Type: jpg project completion.jpg (88.8 KB, 11 views)

jjake is offline   Reply With Quote
Old 02-14-2019, 05:24 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 3,063
Thanks: 36
Thanked 732 Times in 715 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Using a query result on a form's text box

Hi. You could try joining your query to the form’s query or use DLookup()?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 02-14-2019, 07:12 AM   #3
mike60smart
Newly Registered User
 
mike60smart's Avatar
 
Join Date: Aug 2017
Location: Dunbar, Scotland
Posts: 399
Thanks: 21
Thanked 87 Times in 86 Posts
mike60smart will become famous soon enough
Re: Using a query result on a form's text box

Hi

If you include the Task Nr in your query for Total %, you could create a Form based on the query and then insert the Form as a Subform

mike60smart is offline   Reply With Quote
The Following User Says Thank You to mike60smart For This Useful Post:
jjake (02-14-2019)
Old 02-14-2019, 12:56 PM   #4
jjake
Newly Registered User
 
Join Date: Oct 2015
Location: Texas, USA
Posts: 287
Thanks: 76
Thanked 0 Times in 0 Posts
jjake is on a distinguished road
Re: Using a query result on a form's text box

Quote:
Originally Posted by mike60smart View Post
Hi

If you include the Task Nr in your query for Total %, you could create a Form based on the query and then insert the Form as a Subform
This worked great. i just made the subform super small to show the one text box and hid everything else
jjake is offline   Reply With Quote
Old 02-14-2019, 12:59 PM   #5
mike60smart
Newly Registered User
 
mike60smart's Avatar
 
Join Date: Aug 2017
Location: Dunbar, Scotland
Posts: 399
Thanks: 21
Thanked 87 Times in 86 Posts
mike60smart will become famous soon enough
Re: Using a query result on a form's text box

Hi

We were glad to help

mike60smart is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Attempting to have single query result display in Text box on Form ajojeda Forms 15 07-03-2014 07:24 PM
Result from a query being passed to a text box on a form david.paton Forms 10 05-17-2014 02:39 AM
Query result to Text box northernbreaks Queries 3 01-05-2006 09:05 AM
[SOLVED] write a concatenate query and display result in a text box on a form cpippin11h Forms 3 07-21-2005 08:19 AM
How do I use DAO to compare text box on form to query result? KyleB Modules & VBA 9 09-30-2004 01:19 PM




All times are GMT -8. The time now is 03:44 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World