473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Access Subforms - Passing in form values to a query

108 100+
Greetings,

I have a form where a combo box is used to select a name and Id.

Theses values are passed into a subform.

However the query now returns 0 results.
So I edited the query and hard coded the same value as can be seen in the table and rows retrieved.

Now in the form I get strange behaviour where 1 out of 5 times I get results results. Are sub forms buggy when reference form fields as follows:-
[Forms]![frmModuleResults]![txtModuleId]

I capture the values in VBA of the form control and they are exaclty as they should be and if hardcodied into the results, rows are retreived.

Really frustrated.

Any tips or advice?

Cheers
Rob
Feb 18 '08 #1
2 9382
puppydogbuddy
1,923 Expert 1GB
Greetings,

I have a form where a combo box is used to select a name and Id.

Theses values are passed into a subform.

However the query now returns 0 results.
So I edited the query and hard coded the same value as can be seen in the table and rows retrieved.

Now in the form I get strange behaviour where 1 out of 5 times I get results results. Are sub forms buggy when reference form fields as follows:-
[Forms]![frmModuleResults]![txtModuleId]

I capture the values in VBA of the form control and they are exaclty as they should be and if hardcodied into the results, rows are retreived.

Really frustrated.

Any tips or advice?

Cheers
Rob
Rob,
I am not certain whether you used the master/child links to auto connect the main form and the child form. I am also not clear whether you are executing code on the main form to drive the subform. If you are, then you would reference the subform like one of these options:

Reference a control on the subform:
Forms!YourMainForm!YourSubformControl.Form!YourCon trol
Me!YourSubformControl.Form!YourControl

Reference a method to be executed on the subform
Me!YourSubformControl.Form.Requery

Hope this helps. If not provide more details.
Feb 18 '08 #2
robtyketto
108 100+
Thanks for all the advice, requery function help me too.
Feb 20 '08 #3

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

Similar topics

7
by: Julia Baresch | last post by:
Hi everyone, My company recently upgraded from Office 97 to Office XP. As those who've read my other posts know I have a database with 3 nested subforms Main form-->First Subform-->Second...
3
by: pbbriggs | last post by:
I will try to be as descriptive as possible, but this error has me stumped and I am not sure what relevant info to include.... I am running Access XP on a Windows XP machine. I initially began...
0
by: Jenni | last post by:
I currently have a query that is joining two distinct pools of information and turning them into one records with a unique identifier This query is dependent on criteria passed from a form in a...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
41
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and...
1
by: keliie | last post by:
Hello, I've created a form that contains a single unbound combo box and two subforms. The two subforms display the results of a query (driven by the combo box selection) in both tabular and...
20
by: Deano | last post by:
Just looking at C Sharp to see if it might be worth my while learning something new. Has anyone here tried a .NET language and tried to replicate a existing Access app? I would be interested to...
1
by: Shaun | last post by:
Hi all I have converted an accress XP data file to access 2007. The problem I now have is I cant add any data to the subforms. I have enabled all the allow options but still no go! Please help...
0
by: TD | last post by:
I have a main form with two subforms (both in datasheet view), neither of which are linked to the main form. The main form is based on a query that uses the bound column of a combobox on the main...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.