Searching database

B

Brian Royston

I have a membership database I am using to store members details one of the
questions asked is are your happy to let other members see your contact
details a simple yes no answer on the registration form.

What I would like to do is setup a search using first and second name or
both, which I have done using the wizard but can't work out how to only
return the results if the person being searched for has agreed to share
their details.

So how do I return the details only if the yes no field = YES?
 
S

Stefan B Rusynko

In your DB it is best to make the Yes/No Field a TRUE/FALSE field
- default FALSE, set it to True in their registration update
In your SQL string to select results (say the Field is named "ContactOK") use a criteria for the field

Select * FROM TableName WHERE ContactOK=TRUE AND ...other criteria here...

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


|I have a membership database I am using to store members details one of the
| questions asked is are your happy to let other members see your contact
| details a simple yes no answer on the registration form.
|
| What I would like to do is setup a search using first and second name or
| both, which I have done using the wizard but can't work out how to only
| return the results if the person being searched for has agreed to share
| their details.
|
| So how do I return the details only if the yes no field = YES?
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top