Please pardon me for being a novice of Access. I trying to create a "Packing List" using Access form. The Form is very huge & clumps that I'm quite sure that it will ultimate corrupt the Form if I keep on adding fields to the form or in the record source which contain several tens of linked tables.
Below is what I have written in the event procedure of the Packing List Form :
Private Sub Item3_AfterUpdate()
If Me!Item3 = "2." Then
Me.PackDesc3 = Me.Desc1
ElseIf Me!Item3 = "3." Then
Me.PackDesc3 = Me.Desc2
ElseIf Me!Item3 = "4." Then
Me.PackDesc3 = Me.Desc3
ElseIf IsNull(Me!Item3) Then
Me.PackDesc3 = " "
End If
End Sub
- The code of [Item3] above is an example as the form is having from [Item0] to [Item60]. All these Item fields are bounded field to other forms/tables such as Invoice etc (so you can understand how huge the form can be subsequently !!!)
- [PackDesc3] was created in the form, but they were supposed to be bounded (I have yet to add or create new table with 61 of the [PackDesc] fields to one of the record source Tables).
- [Desc3] are from [Desc] fields of the Invoice Table (joined in the record source) in the Packing List form. They are description of the product.
The [PackDesc] fields are supposed to be blank if related [Item] fields are null. However, if [Item] fields equal to any of the same Item No. in the Invoice Table, then [PackDesc] = [Desc].
In the above code of (Me!Item3) example, there is no problem if I add all the 61 [Desc] fields to the record source of the Packing List Form & again create invisible textfields of all the [Desc] in order for them to show up in [PackDesc] fields when the criteria of [Item] fields when same number of Packing List Form & Invoice Table is met.
My question : Is there anyway I can short cut the script by :
1) having unbound fields for [PackDesc0] to [PackDesc60] but each row of records will change according to the input of [Item] fields.
2) Without having to add [Desc] fields in the record source of Packing List Form & create multiple invisible textfields of [Desc] to make their referral to [PackDesc] fields.
Hope what I explained above is understandable to the experts out there.