By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,463 Members | 774 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,463 IT Pros & Developers. It's quick & easy.

max records

lee123
100+
P: 556
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:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdADD_Click()
  2. If txtid.text  >= 72  Then
  3.   cmdadd.enabled= false
  4. ElseIF txtID.text  <=72  Then
  5.   cmdAdd.enabled=true
  6. End IF
but it doesn't work why? or does someone else have any other idea's if you do please share.

lee123
Jan 13 '08 #1
Share this Question
Share on Google+
2 Replies


mafaisal
100+
P: 142
Hello Lee
txtid.text is string
u use
if val(txtid.text) >= 72 then

Try

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:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdADD_Click()
  2. If txtid.text  >= 72  Then
  3.   cmdadd.enabled= false
  4. ElseIF txtID.text  <=72  Then
  5.   cmdAdd.enabled=true
  6. End IF
but it doesn't work why? or does someone else have any other idea's if you do please share.

lee123
Jan 13 '08 #2

lee123
100+
P: 556
thanks mafaisal,

it worked!

lee123
Jan 13 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.