var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Cancel Button on Parameter
Ok here's a INSERT Statement
INSERT INTO tblTmpOrders ( PONumber, PAR, CAB, SUB, QTY, HMMS, ItemDescription, DistributionUnit, UnitPrice, Total, NCC, DeptObj, MinObj, CostCtr, UnitCode, [Date], [Time], InventoryStaff, Barcode, ProcessingStaff, Notes, [Partial] ) SELECT tblOrdersHistory.PONumber, tblOrdersHistory.PAR, tblOrdersHistory.CAB, tblOrdersHistory.SUB, tblOrdersHistory.QTY, tblOrdersHistory.HMMS, tblOrdersHistory.ItemDescription, tblOrdersHistory.DistributionUnit, tblOrdersHistory.UnitPrice, tblOrdersHistory.Total, tblOrdersHistory.NCC, tblOrdersHistory.DeptObj, tblOrdersHistory.MinObj, tblOrdersHistory.CostCtr, tblOrdersHistory.UnitCode, tblOrdersHistory.Date, tblOrdersHistory.Time, tblOrdersHistory.InventoryStaff, tblOrdersHistory.Barcode, tblOrdersHistory.ProcessingStaff, tblOrdersHistory.Notes, No AS [Partial] FROM tblOrdersHistory WHERE (((tblOrdersHistory.PONumber)=[ Enter the PO Number of the first PO]));
Notice: the bold statement is inside a parameter that prompts the user for input..
When the query is run it prompts the user to enter a PO Number. Either he/she enters the PO Number and hit OK or hit Cancel.
How do i prevent the Cancel button from showing up. I don't want him to cancel... This is one of those rare circumstances where he has to enter a PO Number.
You can't control native dialog boxes in access. You will be better off using a custom form to capture your PO number.
Teddy, thanx for your reply.. However, I do not have an idea on where to begin executing your advice. That insert statement I posted, what that does is once the PO is entered it grabs all records associated with that PO and adds them to the order. How can I capture all those records using a form? How do I use filters in a form?
Originally Posted by
You can reference textboxes on a form with the syntax:
You can prevent the user from executing the query by forcing them to provide a PO number before the query ever runs. For example:
Private Sub yourButton_OnClick
If nz(yourTextBox, "") = "" Then
msgbox "Please provide a PO"
'code to execute query goes here