I am an absolute novice so please speak in lay terms if you respond. - TIA
Years ago I developed a program for my business. I copied the alphabetical multistate button and browse from Alphasports where you could push the letter and it would show only the records starting with that letter.
My table got corrupted and I had to copy it and then delete the old one (it was more than 3 gb.)
After I copied it this multi-state button would not work although the alphabetize button worked fine.
I cannot get it to work properly now. I have attached a screen grab because a picture is worth 1000 words.
When I push any button I get the message "no records found. showing all records".
If it is the alphabetize button (C) it then works perfectly and lists all active clients in the browse (B).
If I push any of the letters (A) then I get the above error message and nothing shows - even though I know there are records that meet that.
I think there is an easy answer but I am such a novice I can't figure it out.
The following is the onchange event code.
Thank you for any responses.
Art Kaufman
'script for the multistate button on the Customer form in the invoice
'app
'' Filter the table
''
topparent:tables:Master.filter_expression = "left(FULLNAME, 1) = '" + mulstbtn1.text + "'"+".and. active"
topparent:tables:Master.order_expression = "FULLNAME"
topparent:tables:Master.query()
''
'' Get the table handle from the form
''
t = topparent:tables:Master.current()
''
'' Get the current record count
''
i = t.index_primary_get()
count = i.records_get()
''
'' If we found no records, then we put up a warning and show all records
''
if count = 0
ui_msg_box("Warning", "No records found. Showing all records")
topparent:tables:Master.filter_expression = ""
topparent:tables:Master.order_expression = "FULLNAME"
topparent:tables:Master.query()
end if
Years ago I developed a program for my business. I copied the alphabetical multistate button and browse from Alphasports where you could push the letter and it would show only the records starting with that letter.
My table got corrupted and I had to copy it and then delete the old one (it was more than 3 gb.)
After I copied it this multi-state button would not work although the alphabetize button worked fine.
I cannot get it to work properly now. I have attached a screen grab because a picture is worth 1000 words.
When I push any button I get the message "no records found. showing all records".
If it is the alphabetize button (C) it then works perfectly and lists all active clients in the browse (B).
If I push any of the letters (A) then I get the above error message and nothing shows - even though I know there are records that meet that.
I think there is an easy answer but I am such a novice I can't figure it out.
The following is the onchange event code.
Thank you for any responses.
Art Kaufman
'script for the multistate button on the Customer form in the invoice
'app
'' Filter the table
''
topparent:tables:Master.filter_expression = "left(FULLNAME, 1) = '" + mulstbtn1.text + "'"+".and. active"
topparent:tables:Master.order_expression = "FULLNAME"
topparent:tables:Master.query()
''
'' Get the table handle from the form
''
t = topparent:tables:Master.current()
''
'' Get the current record count
''
i = t.index_primary_get()
count = i.records_get()
''
'' If we found no records, then we put up a warning and show all records
''
if count = 0
ui_msg_box("Warning", "No records found. Showing all records")
topparent:tables:Master.filter_expression = ""
topparent:tables:Master.order_expression = "FULLNAME"
topparent:tables:Master.query()
end if
Comment