473,394 Members | 1,932 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,394 software developers and data experts.

Help with wherecondition and wildcards in VBA..........

Hello, I was wondering how to modify the Do.cmd wherecondition
statement to filter not only for RATTY name but also for the "LAST"
field that contain a "^" carrot in front of them...With the current
system a carrot is placed in front of the LAST field ie ^Smith to
denote it as signifigant and i need to pull those out of the
report....
So LAST not like "^*". what are wildcards in VBA? how is the sytax in
the do.cmd statement anyhelp will be much appreciated..Thanks Much
Private Sub Run_ATTY_Report_Click()
'this runs just attorney
Dim stDocName As String
Dim strAttyName As String
Dim strLAName As String
Dim strReportName As String
strReportName = "By_ATTY_AND_LA"

strAttyName = lstRATTY.Column(0)
strLAName = lstLEGAL_ASST.Column(0)
'MsgBox ("Atty Name = " & strAttyName & " Legal Asst. Name = " &
strLAName)

DoCmd.OpenReport reportname:=strReportName, View:=acViewPreview,
Wherecondition:="RATTY = '" & strAttyName & "'"
Nov 13 '05 #1
2 2868
Gobi wrote:
Hello, I was wondering how to modify the Do.cmd wherecondition
statement to filter not only for RATTY name but also for the "LAST"
field that contain a "^" carrot in front of them...With the current
system a carrot is placed in front of the LAST field ie ^Smith to
denote it as signifigant and i need to pull those out of the
report....
So LAST not like "^*". what are wildcards in VBA? how is the sytax in
the do.cmd statement anyhelp will be much appreciated..Thanks Much
Private Sub Run_ATTY_Report_Click()
'this runs just attorney
Dim stDocName As String
Dim strAttyName As String
Dim strLAName As String
Dim strReportName As String
strReportName = "By_ATTY_AND_LA"

strAttyName = lstRATTY.Column(0)
strLAName = lstLEGAL_ASST.Column(0)
'MsgBox ("Atty Name = " & strAttyName & " Legal Asst. Name = " &
strLAName)

DoCmd.OpenReport reportname:=strReportName, View:=acViewPreview,
Wherecondition:="RATTY = '" & strAttyName & "'"


Is LAST the last name or the last entry?

Look at the LEFT() function.
Nov 13 '05 #2
Salad <oi*@vinegar.com> wrote in message news:<e6****************@newsread1.news.pas.earthl ink.net>...
Gobi wrote:
Hello, I was wondering how to modify the Do.cmd wherecondition
statement to filter not only for RATTY name but also for the "LAST"
field that contain a "^" carrot in front of them...With the current
system a carrot is placed in front of the LAST field ie ^Smith to
denote it as signifigant and i need to pull those out of the
report....
So LAST not like "^*". what are wildcards in VBA? how is the sytax in
the do.cmd statement anyhelp will be much appreciated..Thanks Much
Private Sub Run_ATTY_Report_Click()
'this runs just attorney
Dim stDocName As String
Dim strAttyName As String
Dim strLAName As String
Dim strReportName As String
strReportName = "By_ATTY_AND_LA"

strAttyName = lstRATTY.Column(0)
strLAName = lstLEGAL_ASST.Column(0)
'MsgBox ("Atty Name = " & strAttyName & " Legal Asst. Name = " &
strLAName)

DoCmd.OpenReport reportname:=strReportName, View:=acViewPreview,
Wherecondition:="RATTY = '" & strAttyName & "'"


Is LAST the last name or the last entry?

Look at the LEFT() function.


It is the LAST Name field
Nov 13 '05 #3

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

Similar topics

12
by: Anon | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all I am a beginner teaching myself python, and I am enjoying it immensely :) As a language it is great, I real treat to study, I actually...
20
by: andy.rich | last post by:
I am getting the following error and I do not know why. Can anyone help? -------------------------------------------------------- this is what appears on the screen...
11
by: Shyguy | last post by:
I need to import a text file pretty much daily. I download the file and change the name to a standard name and then run the code to import the file into a table in my database. The problem is...
9
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have...
10
by: Alvaro Puente | last post by:
Hi all! Do any of you know if wildcards are accepted when calling rename() function? Thanks/Alvaro
1
by: Anandan | last post by:
Hi, This is regarding Dataset Filter: WILDCARD CHARACTERS Both the * and % can be used interchangeably for wildcards in a LIKE comparison. If the string in a LIKE clause contains a * or %,...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
5
by: nidaar | last post by:
From a security point of view, is accepting wildcards like "%" in input parameters of stored procedures against any best practices? As an example, if a user defined function uses "Productname...
7
by: rik | last post by:
I am trying to build an Access 2002/2003 database application that I would like to offer to other writers so they can track submissions. Just trying to make a helpful tool for writers, poets, or...
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: 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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.