Help asap! Very confused. (1 Viewer)

rustyCrVx

The Post is a Lie
Local time
Yesterday, 21:25
Joined
Aug 15, 2008
Messages
83
This is my first DB that I've started from scratch and my boss had a very specific plan for how he wanted it to look but in working with that I feel completely stuck.

The main form is frmPurchaseOrder

Firstly I can't get the correct information to appear on the subforms using the combo boxes from the main form. The combo boxes don't fill the rest of the subform the way I want them to and the subform data isn't being attached to the mainform.

Secondly, I'm having issues with the cost code on the main form. It also isn't being attached to the main form's table the way I want it.

I'd appreciate any help and advice anybody can give.
 

Attachments

  • DB.zip
    143.7 KB · Views: 88

ezfriend

Registered User.
Local time
Yesterday, 19:25
Joined
Nov 24, 2006
Messages
242
1. The forms are linked using POID, but your tblOrderDetail contains no POID so no surprise here. Subform's POID default value should be the Reference Number on the main form.

2. How do you want it? The cost code in the combobox is already attached to the table each time you change it.
If you need to display the description, you will need to create a sub routine to pull the description from the table base on the Cost Code. You can't pull that directly since these fields are bounded to the table and the description is in a different table.
 
Last edited:

rustyCrVx

The Post is a Lie
Local time
Yesterday, 21:25
Joined
Aug 15, 2008
Messages
83
Thank you for the prompt reply!

Ok so I fixed the issue with the tblOrderDetail and that works fine. I also made the cost code's description reload OnCurrent for frmPurchaseOrder.

Now I need help understanding what's wrong with my Job and Contact subforms. (I don't
1) Changing the value in the cboContact isn't pulling the other related information in the subfContact fields and
2) I can't figure out how to have the ContactID value saved in tblPurchaseOrder
 

rustyCrVx

The Post is a Lie
Local time
Yesterday, 21:25
Joined
Aug 15, 2008
Messages
83
It was suggested that I post the new modified db so here it is.

I can't figure out what's wrong with the Contact and Job subforms and I'm also having trouble getting the Sum of subfDetails' "Amount" text box into txtTotal on the main form.
 

Attachments

  • DB.zip
    39.1 KB · Views: 92

rustyCrVx

The Post is a Lie
Local time
Yesterday, 21:25
Joined
Aug 15, 2008
Messages
83
Bump

I still haven't managed to figure this out on my own. :(
 

Simon_MT

Registered User.
Local time
Today, 03:25
Joined
Feb 26, 2007
Messages
2,176
On subfDetails create FormHeader and FormFooter. On the Footer create SumAmount which represents =Sum([lngAmount]).

On frmPurchaseOrder txttotal now represents =[subfDetails].[Form]![SumAmount]

The sub totals LngAmount and the Parent transfers it from the subform.

Simon
 

rustyCrVx

The Post is a Lie
Local time
Yesterday, 21:25
Joined
Aug 15, 2008
Messages
83
Thanks Simon. I had done pretty much that only I mistakenly kept the Sum() function on the parent form's textbox which is what was still giving me the error. Anybody have any ideas on the Contact/Job subforms?
 

Simon_MT

Registered User.
Local time
Today, 03:25
Joined
Feb 26, 2007
Messages
2,176
On your frmPurchaseOrder you need to add:

1) ContactID
2) JobID

Take out the Lookup off the Subforms and remove any Criteria.

Simon
 

rustyCrVx

The Post is a Lie
Local time
Yesterday, 21:25
Joined
Aug 15, 2008
Messages
83
I'm still not having any luck. I'm guessing I didn't quite understand what you meant by the Lookup. Here is what I have. I need to be able to turn this in by tomorrow:(
 

Attachments

  • DB.zip
    47.4 KB · Views: 90

Simon_MT

Registered User.
Local time
Today, 03:25
Joined
Feb 26, 2007
Messages
2,176
The frmPurchaseOrder should have the fields to link to the sunforms not on the subforms themselves.

It is Purchase Order's ContactID that relates to ther Contacts and like wise it is the PO's JobID that relates to Jobs.

Simon
 

Users who are viewing this thread

Top Bottom