473,654 Members | 3,114 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 1280
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
2348
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
2381
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 of items, and the second would be a list of categories. By clicking a category in the 2nd box, the members of that category (from the first box) would be highlighted (indicated here by arrows). E.g., -- List of Nums -- -- Categories -- 1...
1
5010
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" name="hulpform"> <select name="varVervuld" id="varVervuld" onChange="alert('Onchange');Vervuld(this.options);"> <option value="0" selected="selected">&nbsp;</option> <option value=JA>Ja</option>
1
5938
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 SET INTEGRITY statement C. With the DELETE phase of the LOAD D. With the UPDATE CONSTRAINTS statement Answer is A
5
27430
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 been able to figure this operation out so far. Code: if (reader != System.DBNull.Value)
1
8055
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 a commandbutton on my form). The biggest problem I'm having is that I can't (don't know how) populate a combobox on static items such as "True, False, Any." The Any field, would be selected by the user to find all records where that fields is...
8
2972
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 box with values too. Depending on the options selected from the two, the values will be calculated and displayed. everything worked fine with the calculation and im getting the right amount totalled up. I only have one issue, whenever the radio...
5
6732
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 (SQL -Change Card List). What I want to do is have the form open the report where a filter is set to use the values from the check box AND the value selected from the list box to generate the report. What I can't figure out is how to use the...
4
6306
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 test_sch.test ( c1 smallint, c2 smallint)" db2 "insert into test_sch.test values(1,1)" db2 "insert into test_sch.test values(2,2)" db2 "create view test_sch.test_v as select * from test_sch.test"
0
8294
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8709
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8494
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7309
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1597
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.