Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2010 > BOOK: Visual Basic 2010 Programmer's Reference
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Visual Basic 2010 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2010 Programmer's Reference by Rod Stephens; ISBN: 9780470499832
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2010 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 30th, 2011, 01:46 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2011
Location: Hebron, KY
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question VB 2010 data from txtbox to Access 2007 table

I am using VB 2010 for a menu and code & MS Access 2007 for tables. I am using data binding to lock a text box to an Access table. I want to input text into the text box and press the TAB key or the ENTER key to go to the next text box. At the same time I want the text in the first text box to be transfered and appended to the Access 2007 table. Thank you for any thoughts you can share on this.
Reply With Quote
  #2 (permalink)  
Old November 30th, 2011, 11:33 AM
Rod Stephens's Avatar
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts

Normally when you use data binding the control is bound to some object that has a notion of the current record. You need to figure out which record that is and make it move to a new record. That should update the value in the current record to whatever is in the TextBox.

If you want to create a new record, you need to call that object's AddNew method (or whatever method it provides for creating a new record). You then need to call it's Update method when you're done to accept the new record.

Overall I think data binding might be a little confusing for this. I would probably just use a SQL INSERT statement (or some other direct database method) instead of data binding to add the record when focus moves to the next field.

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007 mail merger Data Source not found on Windows 7 machine. gemost Access VBA 3 June 20th, 2011 01:45 PM
InfoPath 2007 - Retrieve data from one table, submit to another table (same database) lespaul00 Infopath 0 March 25th, 2011 10:21 AM
Using Access 2010 and Access Services with SP 2010 kmaford BOOK: Professional SharePoint 2010 Development 0 September 14th, 2010 04:25 PM
How to specify relative path to Access 2007 in ADO connection string? [Excel 2007] sektor Excel VBA 4 September 3rd, 2009 11:59 PM
How to use access 2007 databases in vb 2005? Richard C. McAdams BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 2 June 16th, 2008 11:48 AM

All times are GMT -4. The time now is 12:58 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.