modal form wont display records 
Author Message
 modal form wont display records

Can anyone tell me why my modal form isnt displaying data?

Public frm As Form        'Module Level Variable

Function CreateTempForm() As Boolean
    Dim x As Integer

    Set frm = CreateForm

    With frm
        .AutoCenter = True
        .Caption = "Do Manuals"
        .DividingLines = False
        .RecordSelectors = False
        .NavigationButtons = False
        .RecordSource = "SELECT CSZ FROM [Santarosa Traffic2] WHERE wTemp =
0;"
        .Module.AddFromFile "C:\Working\Access\FormCSZ_CloseEvent.txt"
        Set ctl = CreateControl(.Name, acTextBox, acDetail, , "CSZ", 0.1,
0.1, 3888)
        strName = .Name
        DoCmd.Close acForm, frm.Name, acSaveYes
        DoCmd.OpenForm strName, acFormDS, , , acFormEdit, acDialog

    End With

End Function

When run, the form opens modally, but all i can see is a little, barely
visible (what seems to be a part of the form's title bar) image. When I
click on the image I either get the option to Move or Close from a list, OR
the form closes. What do i need to do to get it open so i can see the
records. I am sure the recordSource property should return data.



Sun, 31 Oct 2004 02:22:30 GMT  
 modal form wont display records

From help (PopUp Property):

"The form isn't a pop-up form in Design view or Datasheet view, and also
isn't a pop-up form if you switch from Datasheet view to Form view."

Try this:

DoCmd.OpenForm strName, acFormDS

---
Serge Gavrilov
http://accesstools.narod.ru


Quote:
> Can anyone tell me why my modal form isnt displaying data?

> Public frm As Form        'Module Level Variable

> Function CreateTempForm() As Boolean
>     Dim x As Integer

>     Set frm = CreateForm

>     With frm
>         .AutoCenter = True
>         .Caption = "Do Manuals"
>         .DividingLines = False
>         .RecordSelectors = False
>         .NavigationButtons = False
>         .RecordSource = "SELECT CSZ FROM [Santarosa Traffic2] WHERE wTemp
=
> 0;"
>         .Module.AddFromFile "C:\Working\Access\FormCSZ_CloseEvent.txt"
>         Set ctl = CreateControl(.Name, acTextBox, acDetail, , "CSZ", 0.1,
> 0.1, 3888)
>         strName = .Name
>         DoCmd.Close acForm, frm.Name, acSaveYes
>         DoCmd.OpenForm strName, acFormDS, , , acFormEdit, acDialog

>     End With

> End Function

> When run, the form opens modally, but all i can see is a little, barely
> visible (what seems to be a part of the form's title bar) image. When I
> click on the image I either get the option to Move or Close from a list,
OR
> the form closes. What do i need to do to get it open so i can see the
> records. I am sure the recordSource property should return data.



Sat, 30 Oct 2004 04:40:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. non-modal form when a modal form is displayed

2. display form while a modal form is displayed

3. ActiveX control on modal form give 'can't show non-modal form when modal form is displayed'

4. Problem with draw order after calling modal a modal from from a modal form

5. MODAL FORM & NON MODAL FORM

6. Unloading modal owner form also unloads modal form?

7. Modal Form with Modal form using Control?

8. MODAL FORM & NON MODAL FORM

9. Modal Form can't open another Modal Form

10. MODAL FORM & NON MODAL FORM

11. MODAL FORM & NON MODAL FORM

12. Loading a Modal Form from a Modal Form

 

 
Powered by phpBB® Forum Software