Prikazi cijelu temu 24.01.2015 14:35
pmiroslav Van mreze
Clan
Registrovan od:02.02.2009
Lokacija:Osijek


Predmet:Re: Baza za evidenciju korisnika
Evo je

PreuzmiIzvorni kôd (vbnet):
  1. Function glrDoQBF(strFormName As String, fCloseIt As Integer)
  2.    
  3.     ' Load the specified form as a QBF form.  If
  4.     ' the form is still loaded when control returns
  5.     ' to this function, then it will attempt to
  6.     ' build an SQL WHERE clause describing the
  7.     ' values in the fields.  DoQBF() will return
  8.     ' either that SQL string or a null string,
  9.     ' depending on what the user chose to do and
  10.     ' whether or not any fields were filled in.
  11.  
  12.     ' In:
  13.     '     strFormName: Name of the form to load
  14.     '     fCloseIt: Close the form, if the user didn't?
  15.     ' Out:
  16.     '     Return Value: The calculated SQL string.
  17.    
  18.     Dim strSQL As String
  19.  
  20.     DoCmd.OpenForm strFormName, WindowMode:=acDialog
  21.  
  22.     ' You won't get here until user hides or closes the form.
  23.     ' If the user closed the form, there's nothing
  24.     ' to be done.  Otherwise, build up the SQL WHERE
  25.     ' clause.  Once you're done, if the caller requested
  26.     ' the QBF form to be closed, close it now.
  27.     If isFormLoaded(strFormName) Then
  28.         strSQL = BuildWHEREClause(Forms(strFormName))
  29.         If fCloseIt Then
  30.             DoCmd.Close acForm, strFormName
  31.         End If
  32.     End If
  33.     glrDoQBF = strSQL
  34. End Function

Pozdrav