[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

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
0
sktmx13
Asked:
sktmx13
  • 5
  • 2
1 Solution
 
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
 
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now