|
-
Feb 11th, 2000, 01:09 AM
#1
Thread Starter
Junior Member
Can anyone help me. I hace a DB set up and it works fine exept for one area.
When a user selects a check box and its value is true how do I get the record to display if one of the fields has data sved in it.
It's kinda foxed me...
Thanks
-
Feb 11th, 2000, 01:31 AM
#2
Lively Member
I am not clear what you are trying to do. Do you want to select the record from the DB and display the results?
-
Feb 11th, 2000, 02:21 AM
#3
Thread Starter
Junior Member
Yeah sorry, it isn't clear is it.
When a user is browsing through the database he/she might only want to view records that match a certain criteria. i.e. if the checkbox on the form is selected then only show records that, lets say paid there subscription.
What I want the database to do is only show those records which satisfy the criteria governed by the checkbox....
I hope thats a little clearer...thanks
-
Feb 11th, 2000, 03:40 AM
#4
Junior Member
It is still not real clear what your looking for. What I would do, with how I understand the problem, is use SQL to define the field value that you wish to sort on and then display the data.
Example:
Data1.recordsource = "Select * from Database where checkboxfield = 'Paid'"
Data1.Refresh
-
Feb 11th, 2000, 04:43 AM
#5
Thread Starter
Junior Member
That works fine if the expected text in the field is 'paid'.
The DB should only show the record if there is something in the field....that is to say, if while browsing through the records
data1.recordset.fields(7) has an entry, then show this record. If field(7) is empty, nul, then do not show the record...
Is that any clearer..
Thanks again, sorry about this I havn't done any code for about a year now and just starting to get back into it.

-
Feb 12th, 2000, 07:01 AM
#6
Hyperactive Member
Try this SQL:
If chkPAID.Value = Checked then
Data1.RecordSoure = "SELECT * FROM <table name> WHERE <field name> IS NOT NULL"
Data1.Refresh
------------------
Andrew Nerney
Hapless Programmer
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|