Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2006, 04:59 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Updating a check box in a dataenvironment

Hi im trying to update a check box which is linked to a dataenvironment problem is when i close the program it just loading the values which are already set in the database, how can i update it so the values save to the database?

 
Old June 16th, 2006, 11:03 AM
Authorized User
 
Join Date: Jun 2006
Posts: 73
Thanks: 1
Thanked 1 Time in 1 Post
Default

As the user inputs the 'new' data by whatever means, you will need to write some lines of code which are as follows. open the relevant table, or part-table using Dynaset as your Recordset.(Any other type of recordset will not allow updates) then let's say you've called it MyDynaset. You need to code --- MyDynaset.Edit, MyDynaset!Name = txtName.Text, MyDynaset!************ = txtSex.Text etc. (Obviously I don't know the names of the fields in your tables, nor the 'objects' you take your input from, so I use these as an example) then, when all the relevant fields have been updated, MyDynaset.Update. I hope this helps.Liam.






Similar Threads
Thread Thread Starter Forum Replies Last Post
check box help? dstein4d Access VBA 2 February 27th, 2008 09:54 AM
Check BOx kaushikpulpa ASP.NET 2.0 Professional 2 August 30th, 2007 08:01 AM
Creating DataEnvironment Designer jdeaver VB How-To 0 February 3rd, 2005 12:39 PM
please help (get check box value) qadeerahmad General .NET 3 September 24th, 2004 08:46 AM
how to get value from check box..... cici Classic ASP Professional 2 May 15th, 2004 08:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.