Linking a table/form to a Query/Subform

i noticed that, i thought maybe because you have some code some where
i usually don't have that problem

as far as the all records, the code is DoCmd.ShowAllRecords
try that

I actually got the delay to go away for awhile and now it is back...not sure what I did.

On thing on the QF_query
Here is what I use for the "TMMK-VEH" records
Code:
SELECT QREVALUE.TagNumber
FROM QREVALUE
WHERE (((QREVALUE.TagNumber)=forms![qre value]![QreValue_TMMK-VEH]!TagNumber));

and here is what I use for the All records
Code:
SELECT QREVALUE.TagNumber
FROM QREVALUE
WHERE (((QREVALUE.TagNumber)=forms![qre value]!QreValue_Open!TagNumber));

Why does the Qre_Value_TMMK-VEH need brackets and the others don't?

also I was wondering can the code get confused if I have forms and queries with the same names? Like "QreValue_Open".

on the show all records command. I just took your code and added into the "Find" button that I already had. So it resets before it looks.
 
I am trying to roll this into some others...and it is tricky.
I keep getting the request to enter a parameter...

"Forms!qre value!f_QreValue_TMMTX!TagNumber"

Like you stated long ago...I needed to change the main form to TagNumber and I did that..

Is there something I am missing?
 
I am trying to roll this into some others...and it is tricky.
I keep getting the request to enter a parameter...

"Forms!qre value!f_QreValue_TMMTX!TagNumber"

Like you stated long ago...I needed to change the main form to TagNumber and I did that..

Is there something I am missing?

the code will not get confused, but it's not good practice, if you must use the same name, put a q before the name for queries and f for forms, i do that for all my queries and all my forms

the reason you need brackets is because there's a space in the form name, also not good practice, confuses a lot of things, try avoiding spaces

also, that's why it's not working for you, you need brackets around the form name
 
It is wierd...I had tried the brackets and when I re-opened it it was removed again?

So is the under score "_" considered a blank?

I am going to change all of them and remove all "_" and add "q" and "f's"
 
I had two sets working...now I have none. But I think It will be better in the end.

I changed all my form and queries.
for all forms I added an "f" and removed all "_".

here is my QFQreValueOpen query
Code:
SELECT QREVALUE.TagNumber
FROM QREVALUE
WHERE (((QREVALUE.TagNumber)=forms!fQreValue!fQreValueOpen!TagNumber));

I thought this code would get it. However, it is asking me for the parameter for..Forms!fQreValue!fQreValueOpen!TagNumber

If I try to open the query above by it's self I get the same thing.
 
I got everything worked out and working fine.
However, I ran the "DoCmd.ShowAllRecords"

and now for what ever reason the "On-Click" selection is not having an impact on the main form.

Is there a way to reset the form to the natural state? I even closed the db and still is stuck in the "ShowAllRecords" state.
 
can you attach the db?
i'm not good at solving problems without being able to look at it
 
Here ya go.
Just go to the form fqrevalue and you can see the work we have been doing...

It just quit working once I used the showallrecords command.
 

Attachments

ok, what's the problem
it's filtering for me
 
ok, what's the problem
it's filtering for me
If the filter is working fine, the try reseting the main form by selecting the "Find" button. After I did that, the filter was not working.
 
FYI- The find button has the "DoCmd.ShowAllRecords" inside.
 
i just upgraded to office 07 and i can't help you with this

in 07 the same applyfilter code that works for 03 gives a different result
it filters once and then stops

so i can't help you troubleshoot this because the part that's not working for me in 07 is working for you on 03

maybe someone knows why 07 is doing this?
that way i can get past this part and see why the Find button is not working



the only thing i can say is try removing the line that says previouscontrol.setfocus (in the FIND button)


if that doesn't do, then instead of using the showallrecords command, try creating QFAll query with no criteria, just all the records, and instead of using showallrecords do docmd.applyfilter "QFALL"

if this doesn't work, then maybe someone else can help that has access 03
 
I just noticed a strange thing. It acts as if the filter is working.
However, it always goes to record #1 "OnClick".

Does this mean anything to you? If I navigate to other records and select any record it takes me to record #1?
 
The problem that I am having seems to be tied to the even on the first click. As we talked earlier it always takes a second click to execute the function.

I right clicked the subform and did a filter by selection and then clicked on the form and it executed correctly. For some reason that initial click is not initializing correctly?
 
LaLa first and foremost. THANK YOU for the help you gave me!! It is very valuable to me and I am greatful.

Just to give an update and ask another question.

I have got this figured out. Just like you said, if the code is right it will read and it will work fine. The double click problem we had is also resolved. I think on your orginal db and mine, we had a couple form names off just a little and that was the problem.

I never did get the .showallrecords problem fixed. ( I think it may be fine on the new system I will test it later)

I just started from scratch all over again and am now waaaayyy past it.

My next question.
If you look at the original picture, you can see tabs...(forms)
» QRE Value
» SHIPPING
» INVESTIGATION
etc..etc

All we did was work on QRE VALUE. Well I have also completed the SHIPPING one. It is just like the QRE VALUE form.

Each of these have their own tab off the main form. Which we have not even looked at. I assume that this will only impact the code that is in the QF query?

Currently I am using this:
Code:
[forms]![fQreValue]![qQreValueOpenSubform]![TagNumber]

The main form is named "fQualityManagement"

I thought that all I would need is something like:
Code:
[forms]![fQualityManagment]![fQreValue]![qQreValueOpenSubform]![TagNumber]

Am I at all close on this?
 

Users who are viewing this thread

Back
Top Bottom