473,503 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

check box to select values only in selected table

8 New Member
i have 2 list boxex which are bound together, if you select the ist list box it shows valeus in second table. below the list boxes i have a txt box and command button. Instead of going down each table they can just type the selection and press find it also has a find next butt that searches all the tables. I now want to create a check box that allows the users to view values only in the selected table can anyone assist.




Expand|Select|Wrap|Line Numbers
  1. Dim Sql   As String
  2.  
  3.  
  4. Sql = "SELECT caFieldKey, caTableLink, caTableName, [caFieldName_4], [Field Description] " & _
  5.       "FROM CATABLES INNER JOIN CAFIELDS ON " & _
  6.           "CATABLES.CATableKey = CAFIELDS.CATableLink " & _
  7.       "WHERE [CAFieldName_4] LIKE '*" & txtcaField & "*' AND " & _
  8.             "[Field Description] LIKE '*" & txtcaDescription & "*'"
  9. Set mRS = mDB.OpenRecordset(Sql, dbOpenSnapshot, dbFailOnError)
  10. If Not mRS.EOF Then
  11.   Me.lstcatable = mRS!CATableLink
  12.  lstcatable_AfterUpdate
  13.   Me.lstcafield = mRS!CAFieldKey
  14. End If
  15. End Sub
Mar 14 '07 #1
1 1277
willakawill
1,646 Top Contributor
You only need to alter your sql statement based on the checkbox being checked or not
Mar 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2340
by: A.Dagostino | last post by:
hi i need to update an SQL Table when user select or unselect a checkbox control. How Can i do? Thanks Alex
5
2377
by: callmebill | last post by:
I'm relatively new to javascript, and I'm trying to decide whether the following (and if so, clues on how to do it): I'd like to create two HTML multiple-select boxes. The first would be a list...
1
5004
by: Jan Doggen | last post by:
Hello all, I have a SELECT like this (the 'alert()s are temporary): <FORM method="POST" action="/scripts/runisa.dll?OVB2.132964:PGSPLITVACAFMELDEN:1095144287.9159" id="hulpform"...
1
5892
by: huyuhui | last post by:
The following is a question of LOAD utility. Question: How does the DB2 enforce table check constraints for data added to table with the LOAD utility? A. With the BUILD phase of LOAD B. With the...
5
27361
by: =?Utf-8?B?QnJlbmRlbiBCaXhsZXI=?= | last post by:
Hello. I am reading a value from a table and trying to determine if that value exists in a list of values associated with a dropdownlist. If so, I select the value, otherwise, I don't. I haven't...
1
8036
by: The.Daryl.Lu | last post by:
Hi, two parts to my problem if someone can help address either one or both: 1. I want to SELECT everything in the table if it matches the criteria when the query button is pressed (this is just...
8
2952
by: crayfiss | last post by:
Hi, firstly I am a total freshie in all this. From what I have gathered on the web and this forum, I finally managed to get my form up. I have a set of radio buttons with values to it and a select...
5
6705
by: Andrew Meador | last post by:
I have a form (Change Card List by Status) with a check box (cboNOT) and a list box (lstStatus). There is an Open Report button that opens a report (Report - Change Card List) which uses a query...
4
6297
by: smanojgroup | last post by:
I have a view defined as select * on base table. When base table is altered to add new column, new column does not appear when selected from view. Here is what I did to test. db2 "create table...
0
7083
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...
0
7278
Oralloy
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,...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5011
isladogs
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...
0
4672
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...
0
3166
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...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
379
bsmnconsultancy
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...

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.