473,836 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

passing input parameter to the subform from a form

99 New Member
I need to select count of a column and display it on a subform.To count the column, I need to pass a parameter from a form. How can I capture the parameter form and display it on the subform?All this is in MS ACCESS 2007.

the query is:
Expand|Select|Wrap|Line Numbers
  1. select count(tblequipmentbase.id) from 
  2. (tblequipmentbase inner join tblequipmentparts on 
  3. tblequipmentbase.id=tblequipmentparts.idconnect) inner join 
  4. tblparts on tblequipmentparts.idpart=tblparts.id
  5.  where tblparts.id=Forms!frmparts!ID
"frmparts" is the form
the query is written for a textbox in the subform "frmsparepartsl ist"
The parameter comes from a label.

Is the above query incorrect?Pleas e suggest some idea anyone..
This query runs fine in the sql editor when i give direct value of the parameter.
Feb 15 '12
35 5024
99 New Member
:P Well,Zipping the DB is going to be very difficult.Above is the query that I have used to inner join the tables. I think I am trying to get solutions for two problems at a time.
Feb 20 '12 #31
32,584 Recognized Expert Moderator MVP
Thirty posts for one of the simplest questions we ever get on Bytes!

Let's waste no more time and effort on this. Tell me clearly what you need (which you haven't yet done over these 30 posts) and I'll write it for you.

I think I am trying to get solutions for two problems at a time.
Which we don't allow because it makes life so complicated that neither problem is likely to be resolved (and other reasons - but is certainly against site rules).
Feb 20 '12 #32
99 New Member
I am facing two problems while working.
1.The funtion which is getting called now but is not taking the value it is supposed to take like this
Expand|Select|Wrap|Line Numbers
  1. Public Function ValueSpareQuery() As String  
  2. ValueSpareQuery=strQueryID  
  3. End Function
In the above function, I applied a breakpoint to debug and found that strQueryID is able to take the value from the main form but ValueSpareQuery =""
I do not understand why is this happening.Both strQueryID and ValueSpareQuery are of datatype string.

2.Any hint or idea how I can have only 1 textbox to display the count in the above query?Since I other details are also to be displayed on the screen along with the count,the count is displayed multiple times in the row.

If I have not been able to explain the second problem,let's concentrate on the first one.
Feb 20 '12 #33
759 Contributor
God bless you, NeoPa !
Feb 20 '12 #34
32,584 Recognized Expert Moderator MVP

We are interested in one problem only in this thread :- The problem explained in the first post.

If you have other problems, then we have a big site that can manage more threads from you. What we don't have, and don't allow, is multiple questions in the same thread. May I understand that this thread is completed now, as I don't see any further mention of the original question? Presumably you have a valid answer to that already. If so, I suggest you select an answer from all those posted, and mark it as Best Answer. After that, you take whatever questions you have left, and post them in separate threads. It may be that you only want to post one at a time, as the answer to one may make everything clearer anyway. That's your choice.
Feb 20 '12 #35
99 New Member
Hey NeoPa and Mihail..Everyth ing related to the 1st problem is working now is working now.Thanks a lot!
Thanks again for the patience :D

Here's the Dlookup()
Expand|Select|Wrap|Line Numbers
  1. =DLookUp("[CountInstalledQuantity]","qrySpareparts","[ID]=" & [txtQueryID])
Feb 21 '12 #36

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

Similar topics

by: Thomas Philips | last post by:
To experiment with filtering, I define a function f(x,k) as follows >>> def f(x,k=2): return x%k==0 I can check that it works by typing >>> f(10,3) False Now, I try to filter a range using >>> filter(f(k=3),range(20))
by: carrionk | last post by:
Hi, I have created a Subform which SourceObject is a parameter query. This is the Query: Qry Name:80IsscomProduct SELECT * FROM Isscomp28 WHERE Like ;
by: josephpage | last post by:
I have a Visitor class that is defined in a class library. The class has lots of parameters that are pulled from the QueryString, the ReferrerUrl, Cookies, the Session object, etc... I would like to make a constructor for the Visitor class that accepts an HttpContext instance from within Session_Start in Global.asax.cs as an input parameter. The problem is that I can't figure out how to reference HttpContext from within my Visitor...
by: David W. Fenton | last post by:
I think at various times we've all encountered this problem: A subform is on a main form. From the code of the main form we refer to some property of/control on the child form thus: Me!subForm.Form!txtTextBox and for some reason, in certain contexts, we get the error: Error 2455: You entered an expression that has an invalid reference
by: kulungele | last post by:
Hi there, First of all, greetings from a newbie with Access. I have a View (let's call it view1) that asks for a parameter called "Factory?". I have a Report with 2 graphics and a data table that come from 3 different views, but all the views depend from the original view1. When I try to show the Report, it asks for the parameter Factory, but it does it 3 times (2 graphics + 1 data table). The user is getting angry because I don't know...
by: vijaykumardahiya | last post by:
Hello Sir, I have a simple Issue but It is not resolve by me i.e input parameter are not store in Ms-Access. I store the input parameter through Standard Action <jsp:useBean>. jsp:useBean call a property IssueData. this property exist in SimpleBean which create a connection from DB and insert the data. At run time servlet and server also show that loggging are saved in DB. But when I open the table in Access. Its empty. Ms-Access have...
by: htenay | last post by:
I need to be able to define an array in Java and pass it on to SQL stored procedure. I am new to store proc and found a lot of helpful tutorials on Google but found none that passes parameter of type list, process and return result. My question is: I like to be able to pass input parameter of type list into stored procedure and pars the list, process it and return result set. It is an SQL stored procedure (in DB2) that is called with in...
by: gjain12 | last post by:
Hi All, I want to create an Input Parameter in my procedure which can take a long string of 3000 or more characters. The strored procedure then use this input parameter as clob type to a function which would do further processing. But I am not able to find how to create input parameter for such a long string haivng 3000 or more characters. Any pointers would be very helpful. Thanks, Abhishek Chowdhury
by: doma23 | last post by:
Hello everyone, I didn't use Access some time and now I'm struggling for couple of hours already with something that I used to know... I need to pass the parameter (date) from a comboxes on a form to a query. This is what I have in the query for particular date field: IIf (!! Is Null Or !! Is Null;
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.