473,382 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

ayuda con rowSource

wal
Hola a todos.
Necesito algo muy sencillo. En un formulario de access 2000 tengo un
cuadro de texto y un cuadro de lista, lo que necesito es que al
presionar un botón de comando, me actualice la lista con uno de los
campos coincidente con el ingresado en el texto.
Lo que realice pero sin éxito es:

Private Sub Comando17_Click()
Dim uni1 As String
Dim wal As String
wal = Me.Texto12.Value
uni1 = "SELECT uni.idunion, uni.id1digito, uni.id2digito FROM [uni]
WHERE uni.id1digito=" & wal
Me.Lista14.RowSource = uni1
Me.Lista14.Requery
End Sub
uni es la tabla i los campos son iduni, id1digito y id2digito.

Por favor si alguien encuentra el error indicarme que es lo que esta
mal.
Gracias.

Nov 18 '06 #1
2 4221
On 18 Nov 2006 14:39:07 -0800, "wal" <wa*********@hotmail.comwrote:

One speaks English here.
If id1digito is a Text field, you have to wrap the value with
single-quotes like this:
WHERE uni.id1digito='" & wal & "'"

Also note that after setting the RowSource it's not necessary to
Requery. That happens automatically.

-Tom.

>Hola a todos.
Necesito algo muy sencillo. En un formulario de access 2000 tengo un
cuadro de texto y un cuadro de lista, lo que necesito es que al
presionar un botón de comando, me actualice la lista con uno de los
campos coincidente con el ingresado en el texto.
Lo que realice pero sin éxito es:

Private Sub Comando17_Click()
Dim uni1 As String
Dim wal As String
wal = Me.Texto12.Value
uni1 = "SELECT uni.idunion, uni.id1digito, uni.id2digito FROM [uni]
WHERE uni.id1digito=" & wal
Me.Lista14.RowSource = uni1
Me.Lista14.Requery
End Sub
uni es la tabla i los campos son iduni, id1digito y id2digito.

Por favor si alguien encuentra el error indicarme que es lo que esta
mal.
Gracias.
Nov 19 '06 #2
wal
Thank you Tom.
You are right. I´d resolved the problem.

Tom van Stiphout ha escrito:
On 18 Nov 2006 14:39:07 -0800, "wal" <wa*********@hotmail.comwrote:

One speaks English here.
If id1digito is a Text field, you have to wrap the value with
single-quotes like this:
WHERE uni.id1digito='" & wal & "'"

Also note that after setting the RowSource it's not necessary to
Requery. That happens automatically.

-Tom.

Hola a todos.
Necesito algo muy sencillo. En un formulario de access 2000 tengo un
cuadro de texto y un cuadro de lista, lo que necesito es que al
presionar un botón de comando, me actualice la lista con uno de los
campos coincidente con el ingresado en el texto.
Lo que realice pero sin éxito es:

Private Sub Comando17_Click()
Dim uni1 As String
Dim wal As String
wal = Me.Texto12.Value
uni1 = "SELECT uni.idunion, uni.id1digito, uni.id2digito FROM [uni]
WHERE uni.id1digito=" & wal
Me.Lista14.RowSource = uni1
Me.Lista14.Requery
End Sub
uni es la tabla i los campos son iduni, id1digito y id2digito.

Por favor si alguien encuentra el error indicarme que es lo que esta
mal.
Gracias.
Nov 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ariel | last post by:
Buenas, necesito ayuda para auto-actualizar una página, el tema es el siguiente, use por un tiempo lo siguiente: <META HTTP-EQUIV="Refresh" CONTENT="30"> y ahora estoy usando esto: var...
0
by: Krisa | last post by:
Hello all, I just discovered something (stop me if you've heard this before....) that was causing me a significant performance hit when opening a form with subforms. To speed up loading the...
3
by: Glenn Davy | last post by:
hi Is it possible to have a storedprocedure with a parameter as a rowsource to a combo/list box: e.g. me.cbMyCombo.rowsource='exec spMyLookup @Key=12345' or ...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
4
by: Irena | last post by:
Hi all again, Maybe, I'd better try to do this: How can it programmatically get/return the "Row source" or Rowsource property of a generic Table in a generic Access 2K database??? I found...
8
by: bbdata | last post by:
ok i have a problem here and not much time to play round. have a form bound to a table. one of the combos is bound to a field Agents. i have active and retired agents. thing is, i want to be able...
15
by: Ciudad Tecnópolis | last post by:
Hola, primero que todo mil disculpas por postear una pregunta no relacionada al tema pero se que será muy útil para todos! Actualmente estoy presentando un desarrollo en .NET para una compañía y...
5
by: dkintheuk | last post by:
Is it possible to set (using VBA) the rowsource for a combo box but have that rowsource come from a pass-through query. I can obviously manually go into the rowsource property and define the...
2
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RowSource of a Form is: Forms!FormName..RowSource = "TableOrQueryName"
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.