Results 1 to 5 of 5
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Go To Specific Record on Form

    I am trying to go to a specific record on my form where RegID is the Primary Key and entertrans is the field I want to go to
    entertrans is a yes/no checkbox that I am going to need to save the record and update the totals. If there are more records with this criteria then move to next record. Here is what I am trying:

    If Not IsNull([frequency]) And Date > ([scheduleddte]) Then 'frequency is Daily,Weekly,etc... and scheduleddte is a Date
    MsgBox "You Have Scheduled Transactions To Enter"
    End If


    With Me.Recordset


    .FindFirst "RegID = " & entertrans 'entertrans is a yes/no checkbox
    If .NoMatch Then MsgBox freqpayee & " was not found" 'freqpayee is the Payee for the transaction
    End With

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The condition of RegID = entertrans is nonsense.

    Also, use the RecordsetClone method.

    Do you want to find the first record where entertrans is True or the first record where RegID matches freqpayee or both?

    With Me.RecordsetClone
    .FindFirst "entertrans=True" [or .FindFirst "RegID=" & freqpayee or .FindFirst "entertrans=True And RegID=" & freqpayee]
    If .NoMatch Then
    MsgBox freqpayee & " was not found"
    Else
    'do something
    End If
    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.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    "DATE" is a reserved word and shouldn't be used for object names. Plus it is not very descriptive - DATE of what?? Birth, Hired, Wedding,...?????

    reserved words : http://allenbrowne.com/AppIssueBadWord.html



    EDIT: Oops, my bad. Disregard.

    I was reading too fast. I saw "Date > [ ]...." and I read "A field named Date is GT ....."
    Last edited by ssanfu; 12-27-2012 at 01:14 AM. Reason: reading toooo fast :(

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I thought Date was the current date (Date()). VBA seems to insist on dropping the () for the Date() function.
    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.

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Yes I noticed that too! I have now made the fields on the check register read only and am using a different form to enter the scheduled payments from.Makes more sense I think and will be easier to troubleshoot. I created a append query and a new table to store the data until I can figure out a way to get it back into my check register.Every once in a while Albert shows up but mostly it's just me and Forest! (Einstein and Gump)

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

Similar Threads

  1. Help with opening form to specific record
    By manic in forum Programming
    Replies: 7
    Last Post: 09-18-2012, 08:44 PM
  2. Open form on specific record
    By iky123 in forum Forms
    Replies: 1
    Last Post: 04-11-2012, 09:56 AM
  3. Open form to specific record
    By Two Gun in forum Forms
    Replies: 7
    Last Post: 11-09-2011, 10:00 AM
  4. Open Form to Specific Record
    By batowl in forum Forms
    Replies: 1
    Last Post: 04-08-2011, 10:10 AM
  5. Replies: 1
    Last Post: 11-09-2010, 03:02 PM

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
  •  
Other Forums: Microsoft Office Forums