Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums

Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums (http://www.freeadvertisingzone.com/index.php)
-   Message Boards Directory (http://www.freeadvertisingzone.com/forumdisplay.php?f=60)
-   -   Microsoft Office Standard Using VBA to Send Data t (http://www.freeadvertisingzone.com/showthread.php?t=1149928)

05-04-2011 06:46 PM

Microsoft Office Standard Using VBA to Send Data t
 
Today’s guest author is Justin Farrell,Office Pro 2007, author of the Access 2007 tutorial This is a useful trick which gives the Access Developer additional flexibility when working with forms and data. It uses Access VBA and DAO. Once the user enters data into the unbound textbox (txtBox) and clicks the Send Data To Table button,Office 2010 Standard Key, Access opens a recordset based on the tblTest table. The txtBox data is then stored in a variable called varTextData and then added to the rst recordset. The recordset is updated and the txtBox control is reset ready for new data to be entered. The result is an unbound form that interacts with a database table. Private Sub cmdSend_Click() Dim db As DAO.DatabaseDim rst As DAO.RecordsetDim varTextData As String varTextData = txtBox Set db = CurrentDb Set rst = db.OpenRecordset("tblTest",Microsoft Office Standard, dbOpenDynaset) rst.AddNew rst,Buy Office 2010!fldTest = varTextData rst.Update rst.Close db.Close Me,Office 2010 Activation Key!txtBox = ""End Sub Justin’s supplied a sample database that illustrates this technique. Send your Power Tips to Mike & Chris at accpower@microsoft.com. <div


All times are GMT. The time now is 10:34 AM.

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum