Fill Field on main form from subform based on check box result

  • Thread starter dancox via AccessMonster.com
  • Start date
D

dancox via AccessMonster.com

I have hours of failed research into this problem, so I sure hope I didn't
pass over an obvious answer somewhere in here.

Main Form based on
tblBoltGasketTakeoff
IDBoltGasket Takeoff PK
IDBolts
BoltLength
FlangetoFlange (Checkbox)

Subform based on
tblBoltMaterials
IDBolt PK (1 to many relationship with tblBoltGasketTakoff)
FlangetoFlangeBoltLength

I want BoltLength in tlbBoltGasketTakeoff to populate based on the value in
the control Text33.

The expression that works in a text box Text33 is =IIf([Check18]=Yes,
[subfrmBoltMaterials].[Form]![FlangetoFlangeBoltLength],"0"). Now if I try
to use the expression as a default value and set the control source to
BoltLength, I get the following error "The field is too small to accept the
amount of data you attempted to add. Try inserting or pasting less data."

The default value triggers on
Private Sub Check18_Click()
Text33 = Text33.DefaultValue
End Sub

I have two other tables that are 1 to many relationship to
tblBoltGasketTakeoff, that is why I used tblBoltGasketTakeoff as the main
form contol source. Any thoughts?
 
D

dancox via AccessMonster.com

All the details from my form are in my original post, this is the main
problem...

This expression that works in a text box Text33 is =IIf([Check18]=Yes,
[subfrmBoltMaterials].[Form]![FlangetoFlangeBoltLength],"0").
Now if I try to use the expression as a default value and set the control
source to
BoltLength, I get the following error "The field is too small to accept the
amount of data you attempted to add. Try inserting or pasting less data."
I have hours of failed research into this problem, so I sure hope I didn't
pass over an obvious answer somewhere in here.

Main Form based on
tblBoltGasketTakeoff
IDBoltGasket Takeoff PK
IDBolts
BoltLength
FlangetoFlange (Checkbox)

Subform based on
tblBoltMaterials
IDBolt PK (1 to many relationship with tblBoltGasketTakoff)
FlangetoFlangeBoltLength

I want BoltLength in tlbBoltGasketTakeoff to populate based on the value in
the control Text33.

The expression that works in a text box Text33 is =IIf([Check18]=Yes,
[subfrmBoltMaterials].[Form]![FlangetoFlangeBoltLength],"0"). Now if I try
to use the expression as a default value and set the control source to
BoltLength, I get the following error "The field is too small to accept the
amount of data you attempted to add. Try inserting or pasting less data."

The default value triggers on
Private Sub Check18_Click()
Text33 = Text33.DefaultValue
End Sub

I have two other tables that are 1 to many relationship to
tblBoltGasketTakeoff, that is why I used tblBoltGasketTakeoff as the main
form contol source. Any thoughts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top