wiswalld
asked on
Apply filter to a form
I want to open a form and filter the records only to shows the records where Me.CheckCheckbox = False
... being a master in access databases you should know that! :-)
Post more information.
Post more information.
ASKER
In the query designed in VB.Net I tried this but I keep getting errors. If I take away the where part it works.
SELECT AutoNumber, [Check], [Date], [Time], BOLO
FROM message
WHERE ([Check] = [false])
I cannot figure out this VB
SELECT AutoNumber, [Check], [Date], [Time], BOLO
FROM message
WHERE ([Check] = [false])
I cannot figure out this VB
ASKER
So I was figuring on just adding a filter to the binding source.
=)
right, access, probably...
probably where something in some records equals to some checkbox value on the form or something... I have a great 6th sense! =)
wiswalld:
"....... where myField = " & Me.CheckCheckbox = False
right, access, probably...
probably where something in some records equals to some checkbox value on the form or something... I have a great 6th sense! =)
wiswalld:
"....... where myField = " & Me.CheckCheckbox = False
You can get the information from the SQL directly, like the example I post already.
Show us more code ...
Show us more code ...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
so you can use
"SELECT AutoNumber, [Check], [Date], [Time], BOLO FROM message WHERE ([Check] = " & Math.Abs(CInt(chkMyBox.Che cked)) & ")"
"SELECT AutoNumber, [Check], [Date], [Time], BOLO FROM message WHERE ([Check] = " & Math.Abs(CInt(chkMyBox.Che
ASKER
That did it. Thanks.
JPaulino maybe I should stick to access. I hate trying to learn new things :-)
JPaulino maybe I should stick to access. I hate trying to learn new things :-)
or
"SELECT AutoNumber, [Check], [Date], [Time], BOLO FROM message WHERE [Check] = " & IIf(chkMyBox.Checked, "1", "0")
"SELECT AutoNumber, [Check], [Date], [Time], BOLO FROM message WHERE [Check] = " & IIf(chkMyBox.Checked, "1", "0")
ASKER
Thank. I can't believe I couldn't figure that out.
Dave
Dave
wiswalld,
I do all my project (VB or ASP) in SQL. I don't use access anymore. Just for small things.
You didn't told us if you use SQL, Access, MySql, etc. I just asked for more information.
Good luck
I do all my project (VB or ASP) in SQL. I don't use access anymore. Just for small things.
You didn't told us if you use SQL, Access, MySql, etc. I just asked for more information.
Good luck
ASKER
Sorry.
Note to self (explain more)
Note to self (explain more)
>> I hate trying to learn new things
You must always learn new thing if you really like development!
I love to learn and SQL is very used in the industry.
You must always learn new thing if you really like development!
I love to learn and SQL is very used in the industry.
ASKER
Don't try to confuse me. I am just learning with access. SQL will only screw me up.
If you retrieve information from an database you can use something like "SELECT * FROM myTable WHERE active = " & Me.CheckBox1.Ckecked
Can you tell us more ?
jpaulino