Subform disappears???

fraser_lindsay

Access wannabe
Local time
Today, 09:14
Joined
Sep 7, 2005
Messages
218
I created a database which was working well. I then added my data and it still seemed to be working well. Since then I have made quite a few other changes, but only to queries realting to the subform.

When I cycle through my main records the subform shows and displays all the info. But when I get to the end to add a new record, the subform disappears.

Any ideas as to what I've done?

Thanks
 
Go to the properties of your subform and find the properties "Add allow " changes it to Yes.

Le
 
Hi,

I have checked the properties for my subform and cannot find the 'Add Allow' line you mentioned.

I can see 'Allow Filters', 'Allow Edits', etc, all of these are currently set to yes. Don't know if that makes any difference.

I'm using Access 2000. Could it be called anything else?
 
I can see 'Allow Filters', 'Allow Edits', etc, all of these are currently set to yes

Set 'Data Entry' to No.

RV
 
Thanks, I have checked 'Data Entry' on the form properties and it is already set to 'No'.

I'm stumped here and I can't move on until I find out what I've done. I never changed any properties of any of the forms. I had only made a couple of new queries with calculations then used one query to link these two as my subform record source.

Any other suggestions to check?
 
I would love to but I just can't get it below 380K. I can't get it under 850k at the moment without stripping out essential parts to this particular problem.

I think it must be something to do with my relationships. When I was cutting it down it wasn't deleting the sub records related to the main record. So I must be missing a link somewhere in order to delete them at the same time. I assume this works the opposite way i.e. adding a new tool should link to my table to start creating subrecords.

This only happened after I changed to one query pulling info from two other queries as the record source for the subform.
 
If you can, transfere your tables and forms to a new database. Then, copy your tables but this time, choose the option copy table structure only. So, you will have the same structure of your tables but without data. Delete the old tables and rename the new tables to their appropried names. This will lower the size of your database.


Le
 
Ok, here we go. Followed your instructions and managed it this time.

Thanks for being so patient and helping me out here.

Fraser
 

Attachments

Set AllowAdditions to Yes and make sure that your query itself isn't causing the problem.
 
Your query causes the problem. If you run the queries "qryTestData" or "qryEAVandELVtimes", you will see at the end, it contains a blank record which means that you can add a new record. But if you run the query "qryCombinedData", you don't see a blank record which means you cann't add any record. So, your main form is linked to your subform,but at the last record there are no data. This explain why the subform disappears.

So, what is the solution? I'm not sure, but I see your queries have some fields with calculations. Maybe you have to get rid-off the calculation fields and do it in the textbox on the subform. I don't know this is the best solution. Maybe someone can suggested something else.

I you want me to help, can you provide me the explaination what are the formula of the calculation fields are or what data do you want to show on that field? Give me one example.

Le
 
Your query problem:

qryEA... is built from qryTestData and then qryCombinedData links qryEA... to qryTestData via the primary key TestID. This effectively means that QryTestData is linking to itself using a primary key and therefore is not updateable.
 
OK, I'll try and explain what these queries do and see if I there is a work around.

qryTestData was the main query. Values for measurements of vibration X, Y and Z are enetered directly into these fields. I had to set a query as I wanted something to calculate the sum of these squares, called the vector sum.

The vector sum is the important part and it is this that will need reported on. Ultimately I am looking to be able to produce a report which will give me the range of vector sums (across all tests for one tool) so I can then say what the safe vibration level is for that tool or tool type.

To simply the reporting I wanted to add three more parameters - these are the time that the tool can be used before reaching the EAV and ELV. These are both exposure limits and the calculation works out the maximum duration of time the tool can be safely used. qryEAVandELV calculates the safe use time in hours and minutes for the left hand and right hand for both exposure limits - EAV and ELV.

The third calculation calculates the number of vibration points from the vector sum. Vibration points are easier to total than individual vector sums, again easier for reporting. The number of vibration points is calculated for one hours use which means I can label each tool to illustrate how long a user can safly use it - using a traffic light system.

The reason these are in queries is I thought this was the best way to have so many calculations. I also thought that I have to have them in a query to be able to interrogate them for my reports, which is the ultimate goal after all.

I had to link qryTestData and qryEAVandELV times otherwise the qryCombined showed 8000+ records when there was only about 61 for 21 tools.

Does any of this make sense?
 
I don't know whether this will help.

qryTestData has about 10 calculated fields in it. Could you put these into tblTestData and have a form with all the fields from tblTestData - all would have Enabled = True and Locked = False except for the 10 calc fields which would be Enabled = False and Locked =True.

After every entry into the Enabled = True fields you could have an AfterUpdate event that does a calculation (testing for Null values etc ie won't calculate if any of the required fields are Null). When all the data has been entered then the 10 calc fields would be all updated. If you then changed any data in a field it would automatically update any dependent calc field.
 
For example, the "Ang RH Vibe Pts", how do you calculated this? Give me the fields for this calculation. Or, what is the vector sum is it like this :

Vector sum = X*X + Y*Y + Z*Z ?

and what are the fields do you need to calculated these fields :

TTR EAV LH hrs, TTR ELV LH hrs, TTR EAV RH hrs, TTR ELV RH hrs


Le
 
Last edited:
Problem solved. I have lumped all of the calculations together into one query and it runs fine. Thanks for narrowing it down to the query, I couldn't see why the query didn't allow it at first.

I've checked it and allows me to add new data so it's all good.

Thanks for all your help.
 

Users who are viewing this thread

Back
Top Bottom