Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    35

    Unanswered: Convert form name string to Form?

    I don't suppose it's possible?

    In the form open event, I want to use

    If IsLoaded(Me.Name) then
    set db = currentDB
    set rst = whichForm.RecordsetClone
    end if

    Public Function IsLoaded(ByVal form_name As String) As Boolean
    Dim frm As Form

    IsLoaded = False
    For Each frm In Forms
    If frm.Name = form_name Then
    IsLoaded = True
    whichForm = frm.Name would be nice but obviously doesn't work
    Exit For
    End If
    Next frm
    End Function

    Any suggestions gratefully received
    Marion

  2. #2
    Join Date
    Feb 2005
    Posts
    20
    if whichform is a formvariable you have to write it so:

    set whichform = forms(frm.name)

  3. #3
    Join Date
    Nov 2004
    Posts
    35

    Thanks

    Thanks, I'll try that. I'v also discovered meantime that set rst = Me.recordsetClone works fine.

    Regards
    Marion

Posting Permissions

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