User Profile

Collapse

Profile Sidebar

Collapse
kiwipedia
kiwipedia
Last Activity: Jul 4 '07, 03:51 AM
Joined: May 25 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks - I tried that idea using a few different events - in the end the unload event of the Parent form seemed to be best:
    Code:
    Private Sub Form_Unload(Cancel As Integer)
        If IsNull(Forms!frmentry.subfrmlines![Insertion].Value) Then
        MsgBox ("Please Enter the Line Insertion Date")
        Cancel = True
        Me!subfrmlines.SetFocus
    Me!subfrmlines.Form!Calendar0.Visible = True
    Me!subfrmlines.Form!Calendar0.SetFocus
    ...
    See more | Go to post

    Leave a comment:


  • You are messing with my mind!

    Michael....
    See more | Go to post

    Leave a comment:


  • kiwipedia
    replied to Tricky syntax for subform and subsubform
    Out of interest, I then discovered a new problem - that the setfocus didn't work until I first moved focus to the control (located on subfrmlines) of the newsubcrbsi form and only then could I move it to CRBSIDate.

    Code:
    Private Sub Calendar4_Click()
    If Calendar4.Value > Date Then
    MsgBox "Culture Date cannot be in the future."
                Calendar4.SetFocus
                Calendar4.Value = Date
    ...
    See more | Go to post

    Leave a comment:


  • kiwipedia
    replied to Tricky syntax for subform and subsubform
    Thanks dima69
    I'm not sure when or why but I had named the subform control CRBSI - hadn't appreciated that the control name and the subform name could get out of synch. So problem solved.

    Michael....
    See more | Go to post

    Leave a comment:


  • kiwipedia
    started a topic Tricky syntax for subform and subsubform

    Tricky syntax for subform and subsubform

    Hi all

    I've got a subsubform called newsubCRBSI which sits on the subform called subfrmlines.

    Mousedown on newsubCRBSI.CRB SIDate nicely brings up a calendar on subfrmlines as below...

    Code:
    Private Sub CRBSIDate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.Parent!Calendar4.Visible = True
    Me.Parent!Calendar4.SetFocus
    If Not IsNull(CRBSIDate) Then
    ...
    See more | Go to post

  • Required field / error with null value / can't move focus

    Hi all

    I have a combo-box control [Insertion] which I've set as a required field. It's a date and uses a calendar as coded below. All works fine unless the user deletes a pre-existing value (leaving a 0-length string I guess) and then clicks in the Insertion control.

    This results in Runtime error '2110' with the message that "can't move the focus to the control Calendar0"

    I think this is because...
    See more | Go to post

  • Thanks NeoPa - a much more efficient solution and works nicely.

    Michael....
    See more | Go to post

    Leave a comment:


  • Well I've got my DOB data onto the subform using DLookup to extract the appropriate DOB from the demographics table.
    The code runs whenever the insertion date gets focus.

    Code:
    Private Sub Insertion_GotFocus()
    Dim datDOB As Date
    datDOB = DLookup("DOB", "demographics", "[NHI] = Form![NHI]")
    If (Not IsNull(datDOB)) Then Me.DateofBirth = datDOB
    End Sub
    ...
    See more | Go to post

    Leave a comment:


  • Validation between fields in different tables in Access

    Hi everyone - here is my problem:

    I've got an Access 2002 database with a table [demographics] and a field (not the primary key) called [dateofbirth]. This table has a one to many relationship with a table called [lines]. [Lines] includes a field called [insertiondate].

    I've built a subform based on [lines] with parent form [demographics]. I want to validate [insertiondate] against [dateofbirth] ensuring that [insertiondate]...
    See more | Go to post
No activity results to display
Show More
Working...