Prikazi cijelu temu 27.11.2011 20:40
zxz Van mreze
Administrator
Registrovan od:03.02.2009
Lokacija:Tuzla


Predmet:Re: Pomoc oko combobox-a
Na on current subforme stavi ovaj kod:
Private Sub Form_Current()
Dim BrKomada As Integer
Dim BrRekorda As Integer
Dim Rs As Recordset

PreuzmiIzvorni kôd (Visual Basic):
  1. If Format$(Forms![Combobox1]![test1]) <> "" Then
  2. BrKomada = Forms![Combobox1]![test1] - 1
  3. End If
  4. Set Rs = Me.RecordsetClone
  5. BrRekorda = Rs.RecordCount
  6.  
  7. If BrRekorda <= BrKomada Then
  8. Me.AllowAdditions = True
  9. Else
  10. Me.AllowAdditions = False
  11. End If
  12. Rs.Close
  13. End Sub

Podrska samo putem foruma, jer samo tako i ostali imaju koristi od toga.