473,660 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sql recordsource from a subform

Hi all

Ive got a form with combo which filters a recordset using an sql statement,
and it works fine, here's the code.

mySql = "SELECT *from qryAllByArea WHERE tblInspections. Area= " & Chr(34) &
Me.cboAreaFilte r & Chr(34) & " ORDER BY qryAllByArea.Nc rId;"

Me.RecordSource = mySql
Me.cboNCRId.Row Source = mySql 'Im using this cbo to find records in the
Filtered set. .
Me.Requery

This works fine for me from the form.

I have dropped this form as a subform onto an unbound MainForm, (tabbed
menu) and I'm not getting the same results.
I'm not getting any error message, just not the same number of records being
returned. Funny thing is the cboNCRId has the full set,
but the subform does not display them!

Have tried it in a new form and it works.
Is there any property of the parent form or the tab control which might
restrict the number of records on the subform. ???

Have sorted it by copying the combo into a new form, and the form code.
Works fine like this. Will delete the problem form,
but would like to track down a cause.

Thanks in advance.
BTW its Access 97SR2
Gerry Abbott.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/03
Nov 12 '05 #1
0 1798

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

Similar topics

5
10618
by: Ellen Manning | last post by:
Using A2K. I need the syntax to set the recordsource for a subform within a subform. The "main" subform's recordsource changes based on user input. I need to change the recordsource on the subform within that. What is the correct syntax? Thanks.
4
1656
by: Mr. Bungle | last post by:
Just when I thought I knew everything... Does anyone know why sometimes when creating a subform, the RecodSource property is totally unavailable, this appears to happen when you don't use the subform wizard. Instead of a "RecordSource", it is "SourceObject"(query or table). I am creating a database for someone that does not have the access wizard installed (normally I don't use it much anyways) and when I create a subform and want to...
4
54885
by: Peter Bailey | last post by:
I have a subform that I dont want to have a recordsource initially as it is locking the table that is created dynamically. I want to connect to the table after the data has been written by another routine. I had hoped I could do mytable.recordsource = myquery
2
3644
by: Bill Agee | last post by:
I have a subform called PaymentDetails and would like to dynamically assign the recordsource after the form/subform is opened. The recordsource for Payment Details is "PaymentDetails_qry" which uses a function to filter the Invoice #. The invoiceID is not known until after the form is opened. After the InvoiceID is selected from a dropdown I then want to assign the recordsource ...
9
24593
by: robert d via AccessMonster.com | last post by:
I'm not sure why the following isn't working. The subform loads correctly, but no data is displayed. I'm certain that there is data and I have checked that the SQL statement does in fact return that data (checked by pasting the statement into a new Access Query in the database window). Me.FutureSubform.SourceObject = "FutureProjectionSubForm" Me.FutureSubform.Form.RecordSource = "SELECT * FROM " Me.FutureSubform.Form.Requery Is...
3
2214
by: stuart.medlin | last post by:
I have an Access 97 application that has a basic form (Transcript) and subform. The subform has a query as a recordsource that returns records from a table: SELECT DISTINCTROW Transcript.NCID, Transcript.TransCode, Transcript.TransMM, Transcript.TransYY, Transcript.DateKeyed, Transcript.UserID FROM Transcript WHERE datekeyed >= begindate() and datekeyed < enddate() ORDER BY datekeyed;
2
1755
by: cek172 | last post by:
Is there any way to change the recordsource of a subform from the mainform? I have a subform that I would like to have return data from a table based on selections from multiple checkboxes on the main form. When these selections are made I want the recordsource of the subform to update according to this criteria My main form is called EDIT_PARAMETERS and the subform is called SF_EDIT_PARAMETERS. I have tried a few different code snippets...
8
4357
Megalog
by: Megalog | last post by:
Hey guys.. my turn to ask a question: I'm having a weird issue with a form I've reworked. This form has a combo box, which when used is changing the recordsource of a subform. This subform has no Master/Child relationship set to the main form. Specifically the problem seems to be that everytime the recordsource of the subform is changed, the subform object itself tries to set a default Master/Child value (both fields fill with the "ID"...
3
9388
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RecordSource of a Master Report is: Me.RecordSource = "TableOrQueryName"
3
10679
by: Simon van Beek | last post by:
Dear reader, How to change the RecordSource for a subReport. For forms the syntaxes is:
0
8428
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
8754
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...
1
8542
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,...
0
8630
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 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...
1
6181
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
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();...
1
2760
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
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.