G
Guest
I hope someone can help me. I've been working on this database for week and
the more my customer requests the form does, the more I realize I may have
set this up incorrectly. I am at a complete loss now and feeling incapable.
If someone can hang in there with me a bit and help I will be so
appreciative. Thanks. It's a long explaination, but I wanted to include
everything. Here's my situation:
Tables:
tbl called NewParts where users enter new parts. Key fields are Model,
Part, NHL.
tbl called RefPartsA that is imported from mainframe and never needs
updating. Key fields are Model, Part, NHL.
tbl called RefPartsB that is imported from mainframe and never needs
updating. Key fields are Model, Part, NHL.
tbl called PO that is imported from mainframe and never needs updating. Key
field Part.
tbl called Models where user enter information about each Model. Key field
model.
Process:
In my user form, I need users to enter information about NewParts that
should update the NewParts tbl. In the same form, they will pick, from a
combo box, a Ref Part to be stored in NewParts tbl, which is a list of Parts
from the RefPartA tbl where tbl NewParts Model field = tbl RefPartA Model
field. That same picked Ref Part may also have a matching Part in the tbl
PO. At that moment, I need several fields that are in the RefPartA tbl and
PO tbl to update in my user form that are not stored in the NewParts tbl.
In my same user form, I need users to enter a Part to be stored in NewParts
tbl and automatically display matching fields from RefPartsB tbl where tbl
NewParts Part field = tbl RefPartsB Part field. At that moment, I need
several fields that are in the RefPartB tbl to update in my user form that
are not stored in NewParts tbl.
Since tbls RefPartsA and RefPartsB and PO are often imported from mainframe
reports will need to be created using the most recent data from the imported
tables, I created a query with all tbls mentioned above and the following
joins.
Current Joins:
tbl NewParts tbl RefPartA
model model
refpart part
refpartnhl aspart
*include all records from NewParts and only matching records from RefPartA
tblNewParts tblRefPartB
model model
part part
nhl nhl
*include all records from NewParts and only matching records from RefPartB
tblNewParts tblPO
part part
*include all records from NewParts and only matching records from PO
tblNewParts tblModel
model model
*include all records from NewParts and only matching records from Model
In trying to get the RefPartA and RefPartB information to populate fields on
the form afterupdating, I did a requery, which was taking forever. So then I
setvalues on Part and RefPart AfterUpdate events for those values coming from
tbl RefPartA RefPartB and PO. I thought that was working fine, but I'm
getting error messages like "cannot enter value into blank field on 'one'
side of outer join.
I read in help groups to use a main form and subforms, but I don't think I
can set up my relationships to work correctly. Help system says to have main
form have a a one-to-many with first subform and the first subform to have a
one-to-many with second subform. I don't think I can do that in my
situation, can I?
Thanks again for your help.
the more my customer requests the form does, the more I realize I may have
set this up incorrectly. I am at a complete loss now and feeling incapable.
If someone can hang in there with me a bit and help I will be so
appreciative. Thanks. It's a long explaination, but I wanted to include
everything. Here's my situation:
Tables:
tbl called NewParts where users enter new parts. Key fields are Model,
Part, NHL.
tbl called RefPartsA that is imported from mainframe and never needs
updating. Key fields are Model, Part, NHL.
tbl called RefPartsB that is imported from mainframe and never needs
updating. Key fields are Model, Part, NHL.
tbl called PO that is imported from mainframe and never needs updating. Key
field Part.
tbl called Models where user enter information about each Model. Key field
model.
Process:
In my user form, I need users to enter information about NewParts that
should update the NewParts tbl. In the same form, they will pick, from a
combo box, a Ref Part to be stored in NewParts tbl, which is a list of Parts
from the RefPartA tbl where tbl NewParts Model field = tbl RefPartA Model
field. That same picked Ref Part may also have a matching Part in the tbl
PO. At that moment, I need several fields that are in the RefPartA tbl and
PO tbl to update in my user form that are not stored in the NewParts tbl.
In my same user form, I need users to enter a Part to be stored in NewParts
tbl and automatically display matching fields from RefPartsB tbl where tbl
NewParts Part field = tbl RefPartsB Part field. At that moment, I need
several fields that are in the RefPartB tbl to update in my user form that
are not stored in NewParts tbl.
Since tbls RefPartsA and RefPartsB and PO are often imported from mainframe
reports will need to be created using the most recent data from the imported
tables, I created a query with all tbls mentioned above and the following
joins.
Current Joins:
tbl NewParts tbl RefPartA
model model
refpart part
refpartnhl aspart
*include all records from NewParts and only matching records from RefPartA
tblNewParts tblRefPartB
model model
part part
nhl nhl
*include all records from NewParts and only matching records from RefPartB
tblNewParts tblPO
part part
*include all records from NewParts and only matching records from PO
tblNewParts tblModel
model model
*include all records from NewParts and only matching records from Model
In trying to get the RefPartA and RefPartB information to populate fields on
the form afterupdating, I did a requery, which was taking forever. So then I
setvalues on Part and RefPart AfterUpdate events for those values coming from
tbl RefPartA RefPartB and PO. I thought that was working fine, but I'm
getting error messages like "cannot enter value into blank field on 'one'
side of outer join.
I read in help groups to use a main form and subforms, but I don't think I
can set up my relationships to work correctly. Help system says to have main
form have a a one-to-many with first subform and the first subform to have a
one-to-many with second subform. I don't think I can do that in my
situation, can I?
Thanks again for your help.