form without its buttons

mana

Registered User.
Local time
Today, 09:41
Joined
Nov 4, 2014
Messages
265
hello

i have a form like i attached it and it is bounded to a query and when there are some data between the selected dates the for is filled but when there are no related data the form will be completely empty even the below text boxes are not shown also but i want to have my form with all of the textboxes and buttons just empty. can you help me please?

i also attached the form when it is completely empty.
thank you for your help
 

Attachments

  • Unbenannt.jpg
    Unbenannt.jpg
    88.4 KB · Views: 99
  • Unbenannt1.jpg
    Unbenannt1.jpg
    64.4 KB · Views: 87
Show us the query you are using as the Record source of the form.

If the dates should be in the record, then you can create code to make that happen. If you require the date to be inputted, then you can change the underlying table to make the Date(s) required.

What exactly do you need to happen regarding Date(s) and the input of data values?
 
i attached my query
in query there is datum bewegung and i have pre form and within this form there are two text boxes there i can enter the dates and then press a button to show the query based on my filter dates.
i write the below code vba in a button:

Code:
Dim vAdmin_Flag As Boolean
    Dim vAnalyser_Flag As Boolean
    Dim vReadOnly_Flag As Boolean
        
    If Get_Bearbeiter_Detail(fOSUserName, , vReadOnly_Flag, vAnalyser_Flag, vAdmin_Flag) = True Then
        If vAdmin_Flag = True Or vAnalyser_Flag = True Then
            DoCmd.OpenForm "frm_Bearbeiten_I_FAST", , , "Datum_Bewegung BETWEEN #" & Replace(Format(Me.txt_StartDate.Value, "mm/dd/YYYY"), ".", "/") & "# " & _
                                                                     "AND #" & Replace(Format(Me.txt_EndDate.Value, "mm/dd/YYYY"), ".", "/") & "#"
        ElseIf vReadOnly_Flag = True Then
            DoCmd.OpenForm "frm_Bearbeiten_I_FAST", , , "Datum_Bewegung BETWEEN #" & Replace(Format(Me.txt_StartDate.Value, "mm/dd/YYYY"), ".", "/") & "# " & _
                                                                     "AND #" & Replace(Format(Me.txt_EndDate.Value, "mm/dd/YYYY"), ".", "/") & "#"
            [Forms]![frm_Bearbeiten_I_FAST]![Bereich].Enabled = False
            [Forms]![frm_Bearbeiten_I_FAST]![Prozess].Enabled = False
            [Forms]![frm_Bearbeiten_I_FAST]![Ursache].Enabled = False
            [Forms]![frm_Bearbeiten_I_FAST]![Kommentar].Enabled = False
            [Forms]![frm_Bearbeiten_I_FAST]![Status].Enabled = False
            [Forms]![frm_Bearbeiten_I_FAST]![Verantwortlicher].Enabled = False
            [Forms]![frm_Bearbeiten_I_FAST]![btn_TeilenummerGeschichte].Enabled = False
            [Forms]![frm_Bearbeiten_I_FAST]![btn_Ursachenanalysen].Enabled = False
            [Forms]![frm_Bearbeiten_I_FAST]![btn_ÜbernehmenFürAlle].Enabled = False
        End If
    Else
        MsgBox "Sie sind leider nicht berechtigt diese Funktion auszuführen!", vbCritical
        DoCmd.Close acForm, "frm_Bearbeiten_I_FAST"
    End If
 

Attachments

Users who are viewing this thread

Back
Top Bottom