Results 1 to 2 of 2
  1. #1
    beckysright is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    9

    Bookmark after Append Query

    Hi everyone, I am really new to VBA programming and I need some help. I have created a Quote form that when you click a button it creates the quote number, date and makes a subform visible. Finally, it also does an append query so that the next quote number is based off of. My problem is that every time I click it, the form returns to the first record. I know that there is a way to bookmark this but I can't seem to figure out how to do it. I would appreciate your help but since I am new, please be patient with me. Thank you!

    Private Sub CreateQuoteNo_Click()



    Me.QuoteNo = Format(Date, "yyyy") & "-" & Nz(DMax("Quotes", "PastQuotes"), 0) + 1
    Me.QuoteNo.Visible = True
    Me.QuoteDate.Visible = True
    Me.btnPrintQuote.Visible = True
    Me.btnEmailQuote.Visible = True
    Me.CreateInvoice.Visible = True
    Me.QuoteFrame.Visible = True
    QuoteDate = Date
    Me.QuoteServicesSF.Visible = True
    Me.QuoteTotals.Visible = True
    Me.btnMakeContract.Visible = True
    DoCmd.Save


    On Error GoTo Copy_Of_macAppendQuoteNo_Err


    DoCmd.SetWarnings False


    DoCmd.OpenQuery "qryAppendQuoteNo", acViewNormal, acEdit
    DoCmd.SetFilter "", "[QuoteNo]", ""
    DoCmd.Close acQuery, "qryAppendQuoteNo"
    DoCmd.SetWarnings True




    Copy_Of_macAppendQuoteNo_Err:
    MsgBox Error$




    End Sub

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    Solutions I use are:

    1. Click a 'New Quote' button on a menu form, create the Quote number, append record, open Quote form filtered to that new record, enter rest of data, close form.

    2. Go to 'new record' on Quote form, populate the Quote number, enter rest of data, save record.

    3. Requery and apply filter to the Quote form after record appended.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Bookmark problem
    By ybg1 in forum Programming
    Replies: 4
    Last Post: 11-15-2011, 02:21 PM
  2. Replies: 1
    Last Post: 10-06-2011, 08:37 AM
  3. Replies: 7
    Last Post: 07-21-2011, 01:01 PM
  4. Append query won't append
    By yelkenli in forum Queries
    Replies: 5
    Last Post: 02-12-2010, 11:19 AM
  5. Bookmark a record in a Form?
    By westcoastbmx in forum Forms
    Replies: 3
    Last Post: 10-29-2009, 03:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums