Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    aquabp is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    69

    In The form? What event would that go to? On Activate? How would I get it to load to the field? is it just me.MSort= that variable or rs! The variable is from the form event?

    So I set rs to a variable and put this code in a form event?
    Then in the MSort field I call the variable and format it there?

    Is this the idea?

  2. #17
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    What event would that go to?
    I do not know, maybe OnCurrent. Maybe more than one event. Maybe also and AfterUpdate of a control.

  3. #18
    aquabp is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    69
    I am still trying to get the select statement to work in one of the form events. I read another post on this forum that I think will straighten me out, but until then I will use this code. Once I switched: RD = Screen.ActiveForm.RDate to this line: RD = Me.RDate.Value

    Code:
    Private Sub MSort_Enter()
    
    
    Dim RD As String
    Dim MS As Long
        
        If (Me.MSort) = 0 Then
        
            'finds the RDate for the MSORT field
            RD = Me.RDate.Value
            MS = Format(RD, "yymm")
        
            'Places the above NRec into the GSort Control
            Me.MSort = MS
            DoCmd.GoToControl "VSort"
        Else
            Me.VSort.SetFocus
    
    
    End If
    
    
    End Sub
    Thanks Itsme for all your help and time! It is greatly appreciated!!
    aquabp

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 12-06-2015, 08:21 PM
  2. Replies: 4
    Last Post: 11-25-2014, 11:23 AM
  3. Replies: 12
    Last Post: 11-11-2014, 02:10 PM
  4. Replies: 5
    Last Post: 02-12-2014, 11:52 PM
  5. Form not updating underlying table
    By Kirsti in forum Forms
    Replies: 8
    Last Post: 02-10-2012, 12:23 AM

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