Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2014

    Unanswered: Adding a new record with some criteria filled in and popup

    Hi everyone. This should be easy. I’m just not as advanced as I’d like to be. I have an Access database that I use to track items for an auction. My table ITEMS tracks the auction items in addition to who won an item and the amount they paid for it and the ATTENDEES table tracks each registered guest. At checkout, I have a form that displays a person’s name and shows the total they owe and how they pay. There are buttons that can show the receipt and print the receipt.

    I’d like to have a button that can add a generic item to the end of Items table with and ItemName of “Cash Donation” where you get a popup to fill in an amount which gets entered as the ItemFinal Price and assigns the AttNumber (attendee number who purchased it) to the same person whose information you were viewing on the checkout form.
    In my Items table, ItemNumber is my primary key.

    I appreciate any help. Thanks.

  2. #2
    Join Date
    Apr 2014
    Provided Answers: 34
    I'd skip the popup entry and use a datasheet grid. (like a subform)
    Pick "Cash Donation” (from a list of add-ons?)
    then fill in the field AmtPd.

    You see all transactions like a 'shopping cart' ,plus its an easy edit to change.

  3. #3
    Join Date
    Jun 2014


    Here is the code that seems to work-

    Private Sub Command59_Click()
    Dim dbBoys_Girls_Club_2014 As DAO.Database
    Dim rstItems As DAO.Recordset
    Dim lngNextID As Long
    Dim s As String

    Set dbBoys_Girls_Club_2014 = CurrentDb
    Set rstItems = dbBoys_Girls_Club_2014.OpenRecordset("Items")
    lngNextID = DMax("[ItemNumber]", "Items") + 1
    s = InputBox("Please enter the amount you'd like added", "Additional Donation", Default)

    rstItems("ItemNumber").Value = lngNextID
    rstItems("ItemName").Value = "Cash Donation"
    rstItems("AttNumber").Value = AttNumber
    rstItems("ItemFinalPrice").Value = s
    On Error Resume Next
    End Sub

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts