max records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lee123
    Contributor
    • Feb 2007
    • 556

    max records

    hi there im doing a apartment project where i live and there are only 72 apt's how do make it so when it reaches 72 you can't add anymore lessors in my form i have a Add button that's controled by a adodc control. i tried this:

    Code:
    Private Sub cmdADD_Click()
    If txtid.text  >= 72  Then
      cmdadd.enabled= false
    ElseIF txtID.text  <=72  Then
      cmdAdd.enabled=true
    End IF
    but it doesn't work why? or does someone else have any other idea's if you do please share.

    lee123
  • mafaisal
    New Member
    • Sep 2007
    • 142

    #2
    Hello Lee
    txtid.text is string
    u use
    if val(txtid.text) >= 72 then

    Try

    Originally posted by lee123
    hi there im doing a apartment project where i live and there are only 72 apt's how do make it so when it reaches 72 you can't add anymore lessors in my form i have a Add button that's controled by a adodc control. i tried this:

    Code:
    Private Sub cmdADD_Click()
    If txtid.text  >= 72  Then
      cmdadd.enabled= false
    ElseIF txtID.text  <=72  Then
      cmdAdd.enabled=true
    End IF
    but it doesn't work why? or does someone else have any other idea's if you do please share.

    lee123

    Comment

    • lee123
      Contributor
      • Feb 2007
      • 556

      #3
      thanks mafaisal,

      it worked!

      lee123

      Comment

      Working...