ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data Bound Controls in VBA?? (https://www.excelbanter.com/excel-programming/344913-data-bound-controls-vba.html)

Trip[_3_]

Data Bound Controls in VBA??
 
In VB 6.0 the intrinsic controls are data-bound. For example, a text
box has the .DataSource property which allows you to bind the box to a
data control on the same form.

I have installed VB 6.0 on this computer and copied over all of the
same references, yet, I'm not able to find a data-bound text box. If I
type TextBox1.DataSource = "whatever" in lower-case letters they are
appropriately capitalized as though the .DataSource property is
recognized, but when I try to run the code I get a "Method or Data
Member not found" error pointing to the ".DataSouce" code.

How can I get a TextBox to work with an Adodc data control?? Is there
another data control to use?

Overall, I need to set-up a data control which will allow users to Add,
Delete, and Edit data resding in an Access dB. Any suggestions would
be great (links to examples would be great too). Or, should I just do
it in VB 6.0 and make a call to the resulting external app?

Thanks!

Trip


Leith Ross[_235_]

Data Bound Controls in VBA??
 

Hello Trip,

In VB (Visual Basic) you have a .DataSource property for a TextBox. In
VBA (Visual Basic for Applications) the TextBox has a .ControlSource
property.

It's not clear to me if you are mixing the two languages together or
not. If you have questions about objects in VBA, use the Object Browser
in the Editor to see the Properties, Methods, and Events for a
particular VBA Object. Hope this helps you a little.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=482786


Trip[_3_]

Data Bound Controls in VBA??
 
Thanks Leith, I appreciate the reply! However, I don't seem to be able
to bind a textbox1 to a dB datasource such as an Adodc1 data control or
even a recordset or recordset!FieldName. Do you know of any syntax
which would allow for this??

Thanks again!

Trip

Leith Ross wrote:
Hello Trip,

In VB (Visual Basic) you have a .DataSource property for a TextBox. In
VBA (Visual Basic for Applications) the TextBox has a .ControlSource
property.

It's not clear to me if you are mixing the two languages together or
not. If you have questions about objects in VBA, use the Object Browser
in the Editor to see the Properties, Methods, and Events for a
particular VBA Object. Hope this helps you a little.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=482786



Leith Ross[_246_]

Data Bound Controls in VBA??
 

Hello Trip,

You may want to use SQL to access the recordsets and use VBA to move
and manipulate the data once Access has it. VBA has recordset handling,
but you will most likely need to add a reference to the ADO object
library to call the functions. This is an area I myself am new to. You
may want to post your questions on an Access newsite, since this more
related to Access than Excel.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=482786



All times are GMT +1. The time now is 05:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com