If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Update Query
I am working on an auction database where each buyer has a buyer number. I
have a buyer receipt that prints. When I click on the Buyer Receipt button a select query parameter requests the buyer number. A criteria is than set for that buyer number and the receipt prints. While the criteria is set I would like to update the database on two fields - one called "Receipt" which is a Yes/No and the other called "Printed" which I update to "Receipt printed: "&Date()" to get a time stamp on the receipt time. Later in the reports I will print out that a receipt was printed and when. How can I update the database while it is open with the criteria set to the correct buyer number? I can do another parameter call in an update query and enter the buyer number again. Is there a way to pass the buyer number to the update query so I don't have to put in the buyer number twice? Or is there another way just to update those two fields while the database is open? Thanks for any help. |
#2
|
|||
|
|||
Update Query
On Jul 17, 11:22*am, Greg wrote:
I am working on an auction database where each buyer has a buyer number. *I have a buyer receipt that prints. *When I click on the Buyer Receipt button a select query parameter requests the buyer number. *A criteria is than set for that buyer number and the receipt prints. *While the criteria is set I would like to update the database on two fields - one called "Receipt" which is a Yes/No and the other called "Printed" which I update to "Receipt printed: * "&Date()" to get a time stamp on the receipt time. *Later in the reports I will print out that a receipt was printed and when. * How can I update the database while it is open with the criteria set to the correct buyer number? *I can do another parameter call in an update query and enter the buyer number again. *Is there a way to pass the buyer number to the update query so I don't have to put in the buyer number twice? *Or is there another way just to update those two fields while the database is open? Thanks for any help. Easiest way is to put the buyer number on a form. Doesn't have to be bound to a table (you could use a combobox). then you can reference the control on your update query. UPDATE MyTable SET MyField = Forms![MyOpenFormName]![cboBuyerNumber] WHERE MyTable.UniqueID = Forms![MyOpenFormName]![txtUniqueID] |
#3
|
|||
|
|||
Update Query
am working on something similar. My system works so that, the cashier opens a
form to first view the purchases for that bidder, so the form nad subform are filtered by that bidder's number, and then I run the receipt report from that form, passing the bidder number to the report's query through OpenArgs. You could also run your update query at the same time, using the field in your form that contains the bidder number as the criteria in your sql. " wrote: On Jul 17, 11:22 am, Greg wrote: I am working on an auction database where each buyer has a buyer number. I have a buyer receipt that prints. When I click on the Buyer Receipt button a select query parameter requests the buyer number. A criteria is than set for that buyer number and the receipt prints. While the criteria is set I would like to update the database on two fields - one called "Receipt" which is a Yes/No and the other called "Printed" which I update to "Receipt printed: "&Date()" to get a time stamp on the receipt time. Later in the reports I will print out that a receipt was printed and when. How can I update the database while it is open with the criteria set to the correct buyer number? I can do another parameter call in an update query and enter the buyer number again. Is there a way to pass the buyer number to the update query so I don't have to put in the buyer number twice? Or is there another way just to update those two fields while the database is open? Thanks for any help. Easiest way is to put the buyer number on a form. Doesn't have to be bound to a table (you could use a combobox). then you can reference the control on your update query. UPDATE MyTable SET MyField = Forms![MyOpenFormName]![cboBuyerNumber] WHERE MyTable.UniqueID = Forms![MyOpenFormName]![txtUniqueID] |
Thread Tools | |
Display Modes | |
|
|