SQL statement

can you use other SQL statements when creating recordsets with regards to "select distinct".
Does the "select distinct" statement restrict the capabilities of the recordset?
Also, how do you set a window within a VB program so it can't be moved, draged etc.
NathanSwindellsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RuchiCommented:
2. Set BorderStyle to 3 - Fixed Dialog
0
alokanantCommented:
i think u can also use group by as an alternative to select distinct. i don't think "select distinct" places any restriction on the capabilities of the recordset.

hth
alok
0
DrDelphiCommented:
Select distint will limit the dataset returned, obviously. Other than that, I can't imagine what you might mean. And setting the Borderstyle of the form to Fixed Diaolg wil prevent it from be resized, but not from being dragged or moved. For this you would need to capture the WM_Move Windows message.... I don't know how you can do that in VB. What I do know is that you can set the form's Top and Left to be whatever you want them to be. Maybe have a timer that every so often checks the position of the form and re-aligns it as needed...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

alokanantCommented:
i think it's not that difficult. Just set the moveable property of the form to False, to disallow the window from being moved, dragged.

hth
alok.
0
DrDelphiCommented:
I bow to alokanant's superior VB knowledge. I didn't realize there was a moveable property. <g>

 
0
NathanSwindellsAuthor Commented:
Thanks.
caser scenario regards to distinct.
Im filling a list box for use of drag drop situation.
For example, list of users who are assinged to an office can be assigned to more than one office, so obviously im going to get multiple names in the list box when doing the recordset which uses multiple tables.
So then if i drag both the same user which appears in one list box, then ill get a duplicate error when saving into the dragged target, so need to filter data of duplicates.
Thanks ALOKANANT for the other answer regarding moveable aspect.
0
NathanSwindellsAuthor Commented:
Delphi, Group By works a treat.
Ta
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.