473,786 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

open report based on address

1 New Member
Hello, I have a db that tracks Jobs that our company does. Each job has a unique JobID. I have a report that groups all my jobs by JobStreetAddres s. Since some jobs may be at the same address I want a command button in my Jobs form that opens my report (repair report) just showing the jobs with that address. Here is what I have that isn't working:

Private Sub Command157_Clic k()
On Error GoTo Err_Command157_ Click

Dim stDocName As String

stDocName = "Repair Report"
DoCmd.OpenRepor t stDocName, acPreview, , "[JobStreetAddres s]=" & [JobStreetAddres s]

Exit_Command157 _Click:
Exit Sub

Err_Command157_ Click:
MsgBox Err.Description
Resume Exit_Command157 _Click

End Sub

The syntax error reads "Syntax error (missing operator) in query expression '([JobStreetAddres s]=1390 S. Cooper st.)'.
It recognizes the address in whatever form I am in but I don't understand what to do now. please help.
Mar 28 '07 #1
1 1453
MMcCarthy
14,534 Recognized Expert Moderator MVP
Try this ...

Expand|Select|Wrap|Line Numbers
  1.  
  2. DoCmd.OpenReport stDocName, acPreview, , "[JobStreetAddress]='" & [JobStreetAddress] & "'"
  3.  
Mary
Mar 29 '07 #2

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

Similar topics

55
4676
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's not obvious how the code works if you don't know the intricacies of the Property Let/Get syntax. Likewise, I dislike (and code to minimize the use of) the VB/VBA syntax of returning a value by referring to the function name as if it were a...
5
4547
by: Bob | last post by:
Hi, I am using Access 2000 to print out an address book. I have designed the report based on a database whose first record is not blank. In the design there is a one line report header, a onle line page header, three lines of detail (name address etc)and a footer. On previewing or printing the report it inserts a blank three line detail section before the first record. Every other page is fine except this first page. Not a big deal but it...
5
10600
by: Ryan Hubbard | last post by:
Is it possible to get the recordset from an open query window? So you run the query. The window is open. Can vba retrieve this data?
3
2271
by: daveS | last post by:
I have come accross the exact same problem as below. The address that was given as a solution cannot be found. Specifically, i need to be able to show labels in only the first column of a report! Could someone please help! ***************************************************** Message 6 in thread From: fredg (fgutkind@att.net) Subject: Re: Row headings in a column-based report
8
10770
by: lauren quantrell | last post by:
When I open an Access form I can have no recordset specified, then in the form's OnOpen event I can do something like: Me.paramaters = "@SomeColumn = 22)" Me.recordsource = "dbo.sproc123" But I can't do this in a report as it will prompt me for the parameters, even though they seem to be defined ahead of the recordsource. I have worked around this by opening reports to a bogus recordsource
7
10067
by: Steve_Black | last post by:
Hello, I'm toying with the idea of loading a MenuStrip (VB.Net 2005) dynamically based on who is logged into my system. Every user has different security settings and I want to customize the main menu instead of showing all possible options and only enabling/disabling certain ones. I have a table that stores the menu item name, parent item (if applicable), display order, etc. so that I can dynamically load my
0
1210
by: mike11d11 | last post by:
I have a form with a dataset that contains account records in one table and another table that contains transactions for accounts that are in the other table. I'm trying to create a report based on the two tables using an inner join. I used the report wizard to create my report and when I open it it just sits there not populating like it is hanging. The dataset maybe has about 4500 records in one table and the transaction file has 35K...
3
5546
by: steve | last post by:
Hi All I have a VB.net 2005 app which uses MS Report Viewer to create reports Occassionally I get the following error when changing to a different report User code running on thread 196 has attempted to abort thread 3560. This may result in a corrupt state or resource leaks if the thread being aborted was in the middle of an operation that modifies global state or uses native resources. Aborting threads other than the currently...
14
3574
by: akmaRudiliyn | last post by:
Hi Everybody.. This is my firstime in creating report using microsoft access. Actually i need to build a report based on a database call Table1. I only use 2 column of databse to put in my report. 1) State 2) Status For status, i need to separate it based on value of status;
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9496
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
10363
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
10164
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
7512
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
6745
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
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4066
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
3
2894
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.