|
-
Oct 18th, 2009, 03:22 PM
#1
Thread Starter
New Member
-
Oct 18th, 2009, 05:09 PM
#2
Re: grids
When you set the Data Control's RecordSource property at runtime you then need to call it's Refresh method in order to rebuild the underlying Recordset.
-
Oct 18th, 2009, 05:10 PM
#3
Re: grids
Thread moved to 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)
Is there a reason you are using a dreaded Data Control?
For an explanation of why it is a bad idea, see the article Why is using bound controls a bad thing? from our Database Development FAQs/Tutorials (at the top of this forum)
That article contains a link to the recommended alternative (ADO code), which has an example that replicates the main features of the data control. There are many other articles in the "Classic VB - ADO" section of the FAQs thread (particularly "the further steps" article), which help you to extend it in many ways - like adding search functionality, working with other controls, etc.
If you use code to work with the database instead, in the command button you just need to clear the grid, and re-fill it based on the apt SQL statement.
In terms of the grid you should use, I would recommend either a ListView (the FAQs contain an example of filling it) or a FlexGrid (example in my signature).
-
Oct 19th, 2009, 08:09 AM
#4
Thread Starter
New Member
Re: grids
Wow!!
2 super answers Brucevde got me up an running again with that simple bit of coding,and Si The Geek giving me absolutly tons of of food for thought and pointers about ADO technology
I thank you both
Kind Regards
Tommy
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
|