|
-
Oct 26th, 2005, 08:56 PM
#1
Thread Starter
Lively Member
[RESOLVED] string columnname and using with rst![stringedcolumnname]
Hello there,
i've stringed a Columnname from a particular table
e.g,
Dim sQ As String
sQ = List2.ItemData(List2.ListIndex) '(e.g, value "Set Up")
'prior exists an SQL
List1.AddItem rst![sQ]
However, an error message "Item cannot be found in the...." appeared.
How can i successfully string the column name, and still use it with rst![stringed-column-name]?
Note: MS Access VBA 03
Thanks
Astro
-
Oct 26th, 2005, 08:58 PM
#2
Re: string columnname and using with rst![stringedcolumnname]
You need to use the alternative method of specifying field names, eg:
List1.AddItem rst.fields(sQ)
for a known field name you would do this:
List1.AddItem rst.fields("fieldname")
-
Oct 26th, 2005, 09:45 PM
#3
Thread Starter
Lively Member
Re: string columnname and using with rst![stringedcolumnname]
and si_the_geek strikes again
=)
Astro
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|