Access - Records Value Check on Button Click

As one can see from my form - the user selects the items to be shipped with the checkbox on the left.

Trouble is now that if an item which goes to a different vendor is checked they all get shipped to the first vendor selected.

What I would like to have is a sort of safety measure which says that the last record (CC Vendor) is checked that it would pop up a Message Box mentioning that COATING and CC are different Vendors and asking for confirmation.

Every input is truly appreciated.

Thank You.
access.JPG
sktmx13Asked:
Who is Participating?
 
Rey Obrero (Capricorn1)Commented:
if all the controls in your form are bound to the table's field, you should not have any problem with items going to the wrong vendor.
0
 
Rey Obrero (Capricorn1)Commented:
post the codes that process the shipping of items.

you should include in the codes to select the proper Vendor.
0
 
sktmx13Author Commented:
No Code really. The checkbox is a field inside the database which the user checks. On PrintPackingSlip or Purchase order I just run a query looking for a checked box and pipe it all into a report.

Vendor is user chosen at this point. It's just a table having Vendor Abbreviations and Addresses.

No magic here :) docmd.Requery and docmd.openreport is as deep as it gets .
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
sktmx13Author Commented:
Well, My image may be confusing there. Although the Part Numbers are the same they can in fact go to different Vendors. I just need to figure out if two or more vendors are picked to split them up or ask for confirmation upon clicking the Packing List or P.O.
0
 
sktmx13Author Commented:
I found the following snippet:
Dim strSomething as string
strSomething = ""
While Forms!Mainform!Subform.Form.Recordset.EOF = False
   strSomething = StrSomething & NextRecordData
   Forms!Mainform!Subform.Form.Recordset.MoveNext
Wend

Forms!Mainform!Subforms.Form.Recordset.MoveFirst 'this is just in case I want to use the recordset again while the form is open 
Print #1, strSomething

strSomething = ""

Open in new window


Now, I am thinking... if this guy was able to loop through his recordset can I loop through mine and look for a checked ToShip Box and then compare Vendors on each checked record with each other and throw an exception if there is more than one Vendor selected?
0
 
sktmx13Author Commented:
I implemented a ComboBox which sorts my form using a Filter and force people to select a Vendor prior to Printing.

Not really what I was going for but it works for the time being until I can look into the books some more. :-/
0
 
sktmx13Author Commented:
Problem was solved differently. Solution does not apply.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.