I have a Database Called FalconAnalysis. mdb. The table I am wanting to use is called Generic Material. The Query I want to pass the value into is called Material Query. The field in the query is called Order_Model. I would like to pass the result, "strSize", from the following string of code into the Order_Model field of Material Query, which looks at generic Material Table. -
Private Sub MakeFilter2()
-
-
strSize = ""
-
-
If Nz(chkv2125S, False) Then _
-
strSize = strSize & ",'150'"
-
If Nz(chkv2125H, False) Then _
-
strSize = strSize & ",'151'"
-
If Nz(chkv215S, False) Then _
-
strSize = strSize & ",'180'"
-
If Nz(chkv215H, False) Then _
-
strSize = strSize & ",'181'"
-
If Nz(chkv2175S, False) Then _
-
strSize = strSize & ",'210'"
-
If Nz(chkv2175H, False) Then _
-
strSize = strSize & ",'211'"
-
If Nz(chkv220S, False) Then _
-
strSize = strSize & ",'240'"
-
If Nz(chkv220H, False) Then _
-
strSize = strSize & ",'241'"
-
If Nz(chkv225S, False) Then _
-
strSize = strSize & ",'300'"
-
If Nz(chkv225H, False) Then _
-
strSize = strSize & ",'301'"
-
-
-
End Sub
-
I think it should be a like statment, any thoughts on how to do this?
Feb 6 '07
10 3403 nico5038 3,080
Recognized Expert Specialist
Why not create a table with the 150, 151, 180, 181, etc. values in a row and an additional checkbox.
Thus you can let the user check the rows in a datasheet subform and all needed is to join this additional table by the code to this table and add the criteria "True" for the checkbox.
Saves the code and you could use a simple UPDATE query to set/reset the checkbox on the form.
Idea ?
Nic;o)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: NK |
last post by:
Hi all,
Does anyone know of how I can disable case sensitivity for the LIKE
function in SQL?
Currently the SQL statement looks like:
$query = "SELECT * FROM itrader_games WHERE console='$console' AND
genre='$genre' AND title LIKE '%$title%' ";
|
by: Martin Robins |
last post by:
I am trying to parse a string that is similar in form to an OLEDB connection string using regular expressions; in principle it is working, but certain character combinations in the string being parsed can completely wreck it.
The string I am trying to parse is as follows:
commandText=insert into (Text) values (@message + N': ' + @category);commandType=StoredProcedure; message=@message; category=@category
I am looking to retrive name value...
|
by: joshsackett |
last post by:
I am starting an encryption project for my database and I'm performing
some tests on decryption speed. A lot of my application queries use a
LIKE parameter in the WHERE clause. To keep from changing my
application I am performing all the work on the back-end; creating
views, triggers and UDFs to encrypt/decrypt the data. A problem has
arisen around the LIKE parameter, though.
Currently:
SELECT SSN, FNAME, LNAME FROM USERS WHERE LNAME...
|
by: Dave Smithz |
last post by:
Hello there,
Summary:
How far can you go with SQL Select queries using like clauses with wildcard
characters. Can you apply anything like regular expressions?
Full details:
On a Intranet website, I request a code from a user which is then compared
with a code in an ADO access database.
|
by: S. van Beek |
last post by:
Dear reader,
How can I filter a numeric field with Like as criteria in a query.
To filter a numeric field with <10 as criteria this will com back with the
result of those records for which the value is smaller as teen.
But in case this value is variable and you prefer to work with "Like
| |
by: mosscliffe |
last post by:
I have been messing with the above all afternoon.
I must just be thick
I am using an AccessDataSource
I have tried modifying the select but I can not find the right syntax
to concatenate the LIKE part of the test by surrounding my textbox
field value with a leading and closing %.
|
by: Bruce Lawrence |
last post by:
Ok, I'm baffled...
I'm making a query in access 97 between 2 tables. There is a field in
both tables called "DWGNO".
OPENORD has a record with a DWGNO of "00000012345"
DIEDATA has a record with a DWGNO of "12345"
I'm not doing this with VBA right now. I'm doing it through the query
gui.
|
by: Drum2001 |
last post by:
Hello All!
I am using the following code during an On Click event for a button.
It works properly to create a query for a report:
Private Sub Command14_Click()
If IsNull(Me.Text30) Then
' No criteria here - so ignore
Else
strWhere = strWhere & ",'" & Me.Text30.Value & "'"
|
by: MLH |
last post by:
If I drop Like "*ABC*" in a QBE grid criteria cell,
the records returned include mixed case. Can I
force the uppercase limitation in a QBE grid?
|
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,...
|
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...
| |
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,...
|
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...
|
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();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |