I can't figure this out

Okay, please explain the purpose of this form. It looks like you have a few things still yet to get fixed before we even worry about this totals thing.

1. Why is the order number combo box an unbound combo? Is it supposed to locate the order in the form? If so, there is no code to do so.

2. The Customer ID text box isn't going to do anything for you as it is bound to an expression.

3. The table that the main form is bound to, is that supposed to have already had orders created from another form? If so, then your combo box to select the order number needs to have code to move to the right record.

4. The subforms have their DATA ENTRY property set to YES, which isn't good in this case because you can't see anything already allocated to this order if you happen to navigate somewhere else.

5. The two subforms have different names for their subform controls and so you need to refer to the names of the subform controls (controls on the subform which house the subform on the main form) in your code or expression, rather than the name of the subforms themselves.
 
Oh and here I was thinking I was doing good too!:rolleyes:

Well, there's a LOT to learn, so don't feel bad.

So, what is the purpose of that form. How do you envision its use?
 
Okay, please explain the purpose of this form. It looks like you have a few things still yet to get fixed before we even worry about this totals thing.

This form is the form that actually creates the data in tblOrderDetails.

1. Why is the order number combo box an unbound combo? Is it supposed to locate the order in the form? If so, there is no code to do so.

I thought I had done this right cause it is pulling the information I wanted it too... You select the order number and then it uses the customerID from tblOrderHeader to pull the customer information (strictly for verification purposes)

2. The Customer ID text box isn't going to do anything for you as it is bound to an expression.

again just for verification that the data is assigned to the right customer.

3. The table that the main form is bound to, is that supposed to have already had orders created from another form? If so, then your combo box to select the order number needs to have code to move to the right record.

yes tblOrderHeader gets it's data from frmCreateOrder

4. The subforms have their DATA ENTRY property set to YES, which isn't good in this case because you can't see anything already allocated to this order if you happen to navigate somewhere else.

I didn't realize that but when I had it set to no the forms didn't show up

5. The two subforms have different names for their subform controls and so you need to refer to the names of the subform controls (controls on the subform which house the subform on the main form) in your code or expression, rather than the name of the subforms themselves.

I'm confused by this I thought I was (not that i'm surprised if I was doing it wrong)
 
Nicolette,

That means one of three things:
- frmCreateInvoiceSUB is not the correct name of the subform control (Note: this refers to the name of the subform control on the main form, not the name of the form that populates the subform - they are not necessarily the same.)
- OrderSubtotal is not the correct name of the control on the subform that you are referencing.
- The name of the control on the main form where you are entering this expression is the same as the name of a field in the main form's Record Source table/query.
 
- frmCreateInvoiceSUB is not the correct name of the subform control (Note: this refers to the name of the subform control on the main form, not the name of the form that populates the subform - they are not necessarily the same.)

That was it! I got it thank you! how silly of me!:eek::D
 
Bob,
I am still looking forward to your review.... If there is any simpler way to do this I am all ears simplicity is my middle name!
 
Yay!! I am very happy to know that we finally got there, Nicolette!

By the way, not so silly of you... I think it is a common mistake. Silly of me and the others here not to think of it sooner! ;)

For the record, I use the naming convention of always naming a subform the same as the name of the form it contains. (Except in those cases where a subform can contain variable forms, and the Source Object of the subform is set in code - but that's another story.) Other developers I know adopt the practice of always naming them different. I think consistency is the key. But after a while you get in the habit of looking out for stuff like that.

Best wishes with the rest of your database project.
 
I didn't realize that the Name in the properties wouldn't be the same as what I saved the form as.... I made a note of this tid bit in my notebook of things I consider quirks in access LOL! It is fillin up fast!
 
I didn't realize that the Name in the properties wouldn't be the same as what I saved the form as.... I made a note of this tid bit in my notebook of things I consider quirks in access LOL! It is fillin up fast!

It really isn't a quirk. The subform control and the form it uses are two, completely different objects. So, if you add the subform to a main form by dragging and dropping, it names the subform control the same. If you add it by the wizard it gives you the OPTION to name it something yourself which, of course unless you know about the little secret of the naming, would be natural to give it a completely different name.

And, as it has been pointed out, if the names are not the same then you have to use the subform CONTROL name and not the subform name when referring to the subform (and that is counterintuitive, for sure).

Anyway, I hope your project continues to go well and I'm glad that we have such an abundance of people to help. :)
 
oh i know it isn't really a quirk.. it is more a secret thing you (or at least I) have to fight with for days before you (I) get the duh feeling!

I also am glad there ar so many of y'all who know what they are doing to helpout folk like me who want to know how!

I appreciate the way you all explain not just giving the answers
 
Nicolette,

I think most of the people who know some of the answers by now, have got there by fighting those same fights. We have figured out that Access is great, and it's worth the fights. :) So it is always gratifying to see others who are keen to learn.
 
i could only hope to be as knowledgeable as you all are but i will feel great satisfaction if I can get my database to do everything I want it to!
 

Users who are viewing this thread

Back
Top Bottom