I have a form with a text box that has its control source set to a
field in a table. Let's say the table looks like:
Field1:1,2,3,4,5,6,7,8,9,0
Field2:a,b,c,d,e,f,g,h,i,j
How can I set the caption of a button to be the current value that is
referenced in the text box?
How can I set the caption of a button to be table Field 4?
Thanks!
Tim 2 1294
Hi Tim,
You could add some code to the After Update event of your text box:
Me.myCommandButton.Caption = Me.myTextBox.Value
Cheers - David
On 8 Feb 2007 01:02:04 -0800, Tim C wrote:
I have a form with a text box that has its control source set to a
field in a table. Let's say the table looks like:
Field1:1,2,3,4,5,6,7,8,9,0
Field2:a,b,c,d,e,f,g,h,i,j
How can I set the caption of a button to be the current value that is
referenced in the text box?
How can I set the caption of a button to be table Field 4?
Thanks!
Tim
If I understand your question correctly, you wish to set the caption
to whatever text value is associated with the number value in Field1
(4).
Me![ControlName].Caption = DLookup("[Field2]","TableName","[Field1] =
4")
If however, the field value (4) is entered into a control on the form,
then:
Me![ControlName].Caption = DLookup("[Field2]","TableName","[Field1] =
" & Me![ControlName])
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Masterblue |
last post by:
Hi, Right know im teaching myself a little about CDONTS . But know I want to
sent data form a database with a form.
I wou ld like to do the following:
- I have made a page with set of records....
|
by: Ray Holtz |
last post by:
I have a database in Access 2003 (Access2000 file format). There are
two tables that are being used: Employees and Items. It is linked by
the Employee field so that one employee can have many...
|
by: F-13 |
last post by:
I'm working on a BOM in Access 200 from an example downloaded from from
the web. The sample database contains three tables, Assemblies (the
list of items needed to assemble any assembly),...
|
by: Harry Devine |
last post by:
I have a DataGrid that is configured to use the Edit/Update/Cancel concept
correctly. My grid shows values from 5 database fields. I only need to
update that last 4 fields. The last field is a...
|
by: Art |
last post by:
Hi everyone
I was hoping someone might be able to help me with this. I'm just starting to try to work with MS Access tables through VB.net. In Access I can take an existing table and add a new...
| |
by: George |
last post by:
Hi all,
I am having trouble with updating my data in an Access database. here is my
code:
Imports System.Data.OleDb
Dim AppPath As String = Mid(Application.ExecutablePath, 1,...
|
by: mfreeman |
last post by:
The minimal code (VB.NET 2003) needed to show this problem is shown
below. All I do is loop through the records in the table and update
them without making any changes. Out of 600 records, about...
|
by: alexandre.brisebois |
last post by:
Hi, I am using access 2003, I would like to know if there is an option
to reorganize the tables in a maner that is readable, as we can do in
sql sever 2000 or 2005.
I have been given a database...
|
by: Chris |
last post by:
Hi,
I'm using the following code
DataTable tables = ((OleDbConnection)oleconn).GetOleDbSchemaTable(
OleDbSchemaGuid.Tables, new object { null, null, null,
"TABLE" });
foreach (DataRow r in...
|
by: chaitanya02 |
last post by:
Hi All,
Well- this question might have appeared several times on this forum- but would appreciate your reply on this:
I have a asp page, where customers login with some username and the pwd,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |