473,725 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with subform when paratmeter query returns NULL

Hi There,

I have a main form that with a subform which is based on a parameter
query. I have 2 controls on the main form [OpenDate] & [Close Date]
which are used as parameters in the query. It all works fine and dandy
until the query returns no records. The main form just "whites out"
(probably due to the background coulor set to white!) when I get no
records. I have coded and error message in the subform for when no
records are returned and that doesn't show up either. It does however
work if the subform is opened independently. I have tried coding the
main form with the error message but again the white out prevails.
All I want if i get no records is that an error message pops up and
stes the foucs to the date controls.

Can anyone tell me what is going on please.

Cheers,

John

Oct 25 '06 #1
1 1853

Macbane wrote:
Hi There,

I have a main form that with a subform which is based on a parameter
query. I have 2 controls on the main form [OpenDate] & [Close Date]
which are used as parameters in the query. It all works fine and dandy
until the query returns no records. The main form just "whites out"
(probably due to the background coulor set to white!) when I get no
records. I have coded and error message in the subform for when no
records are returned and that doesn't show up either. It does however
work if the subform is opened independently. I have tried coding the
main form with the error message but again the white out prevails.
All I want if i get no records is that an error message pops up and
stes the foucs to the date controls.

Can anyone tell me what is going on please.
I have a feeling you're not using the LinkChildFields and
LinkMasterField s properties of your subform. I'm assuming that you
want your subform to return related records based on values in your
main form which is why you created the parameter query as the source
for your subform. Look up the LinkChildFields and LinkMasterField s in
online help. You should be able to accomplish the same task without
using a parameter query.

Bruce

Oct 25 '06 #2

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

Similar topics

4
2292
by: CSDunn | last post by:
Hello, I have a combo box (Combo7) that needs to call a function during the After Update event of the combo box. The function resides in an Access 2000 ADP Module called MMAnswerData_code. The following is the code of the function: Public Function SubFormRS(FrmTarget As Object) Forms!frmAD_OpeningForm!FrmTarget.RecordSource = "EXEC dbo.AdSubFormRecSource " & Forms!frmAD_OpeningForm!SubFormFilter
25
10254
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
4
7017
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the user enters the last qualifying field on the main form. In one case this works fine, the subform shows the data the user wants to update -- which means showing all the data put in previously (ie showing this via the requery and the continuous...
5
1468
by: Krechting | last post by:
Hi All, I have a db with three tables which have a relationship. The problem is that when I add a record to the ForAction table it will automatically add a record to the Originator table but not to the RFI table. I do not want access to add a record to the Originator table but only to the ForAction table. Is this possible?
0
1734
by: Giulio Santorini | last post by:
Hi, I've got two drop down list controls. When I select a value from the first one I fill the second one. And when I select a value from the second one I would like to fill another control. But after have choose from the first control and filled the second... when I select something from the second control I have not the post back event! I hope to be understandable! I've attached the code that make problems. It's commented in italian so...
4
2244
by: Steve_s | last post by:
Hi I am having problems totalling a particular field in a subform.I am using Access 2003. The subform is based on a query which selects records with various financial information. I have 5 text boxes in the form footer which total certain fields. I have no problem totalling 4 of the fields, but one field which is a calculated field ( ie gross cash - commisions= nett) rounds the figure down ie 175.85 becomes 175.00... I have tried...
9
9694
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a master-child link to the first subform. subform2 - Master Field: subTrainingModule.Form!TrainingModuleTopicSK Child Field: TrainingModuleTopicSK
1
1905
by: saundap | last post by:
Hi, Access 2000, Windows 2000 Professional I have a form I've developed that is designed for those not familiar with access and its query tool. WIthin a subform in the form there is presented information from a query I've already created. This query's information is manipulated by the user selecting values from drop down-combo boxes on the form. Its a requery form, really. You may be familiar with how this works. Its done by using...
1
1789
by: csolomon | last post by:
Happy Friday! I was wondering if you can have more than one total in the footer. I ask this because when I set up one of my totals in the footer (lets call it total1), it works (slowly but it works)...but when I set up the other one (total2), I get an error for the total1 value and an error for the total2 value. I have a function, GetYield, that returns a calculation based on the material chosen (matType). Public Function...
0
8888
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, 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...
0
8752
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9257
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 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...
0
8097
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6011
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();...
0
4519
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...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3221
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 we have to send another system
2
2635
muto222
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.