Hello,
I have a form and subform with their tables linked by a field called
Load_ID. I have a button on my subform that prints just the items listed on
that particular subform (looking at Load_ID). I'm using the following code:
DoCmd.OpenRepor t "Load Sheet", acPreview, , "[Load_ID]= " & "'" &
Me.Parent.Form![Load_ID] & "'"
This works fine, but now I want to automate the process, so I set the
Load_ID on the main form/table to be an AutoNumber field. I changed
subform/other table Load_ID to a number field (it was a text field), but I
get the following error when I press the print report button:
Run-time error '3464'
Data type mismatch in criteria expression.
I assume this is because my Load_ID is a number value instead of text. My
question is, how do I re-write the above command to get it to work with
number values? Any help would be appreciated.
Thanks,
Chad 2 3312
Chad,
You don't need the quote marks around a number. Access thinks you are
trying to pass a string, even if it's all numbers.
DoCmd.OpenRepor t "Load Sheet", acPreview, , "[Load_ID]= " &
Me.Parent.Form![Load_ID]
should do the trick.
That worked great. Thanks for the quick reponse. That solved my problem.
Thanks,
Chad
"Wolf" <sp************ *@hotmail.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. . Chad, You don't need the quote marks around a number. Access thinks you are trying to pass a string, even if it's all numbers.
DoCmd.OpenRepor t "Load Sheet", acPreview, , "[Load_ID]= " & Me.Parent.Form![Load_ID]
should do the trick. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jan |
last post by:
I am having problems trying to print a report based on a form. This
is a search form only, no data input. There is a query that the form
looks at, but then there are numerous comboxes that you can pick
information from either one or many and press a search button. See
code below for the "Case Select" that was used to make up the
comboboxes. Not a filtered list. My problem is that when I try to
print, it prints all records before the...
|
by: sea |
last post by:
I need to be able to print the current form because the form has an
embedded object of a .gif file, so report will not work -- does anyone
know the way to do this? I tried some code, not sure what it was now,
guess docmd.printout or something but that prints ALL the forms --
also the each page of the form does not always start at the next page
even if allowcontinuousforms is set to no. The preview button previews
all the forms as well,...
|
by: Glenn Zamora |
last post by:
I am new to MS Access. I have created a simple entry form to track
patient information. I have also created a Patient Report that prints
Patient Information with a standard disclaimer statement. I added a
print button to my entry form hoping that the patient information that I
enter will merge with the Patient Report however I must be missing a
step because when I click on the print button it prints all patients in
the database. Is there...
|
by: ghat12 |
last post by:
Hi,
I am trying to print a subform containing approx 50 columns in
datasheet view. The printout cannot fit more than 8-10 columns. Does
anyone know of any way to print all columns; i don't care if the
printout spans multiple pages.
FYI, the records displayed in the sub-form are dynamically obtained
based on some ad-hoc querying in the main form. Any report, etc.
generated will have to have the same set of records.
|
by: hosi |
last post by:
Hi, suppose I want to print third record from a subform.
The problem is, that when I want to print what I see on my monitor
(third record), the print preview resets
the form to the first record (wants to print the whole form beginning).
Is the any possibility to print a particular record, without making
screenshots?
Please, help me!!!
| |
by: Brad Pears |
last post by:
I have a vb.net 2005 application and am using the print preview screen. This screen has a printer icon on it that the user can use to print the document currently being viewed. It uses the default printer settings to print.
I wanted the print preview to appear the same for all users (i.e. a default page size of 8.5x14 (legal) and portrait mode). Many users have different printers as their default (plotters etc..) and I found that various...
|
by: alphaomega3 |
last post by:
I'm back with a new set of problems with the old NCR database from a year ago.
I have a form that is for Nonconformance Entry. In the process of entering this form if the supplier for the nonconforming material is external the entry person clicks a checkbox and a lookup is performed to a pass thru query.
Currently, we print off a Nonconformance report after all data is entered. We have added a new form for external vendors call a...
|
by: sconard |
last post by:
I have a subform in datasheet view that is the result of a complex vba custom query with a number of parameters. I would like to place a button on the parent form to print the datasheet view as a report or generate a report from recordset that created the datasheet view. I do not see the ability to create a report from a form. How is this best achieved?
Thank You
|
by: Studiotyphoon |
last post by:
Hi,
I have report which I need to print 3 times, but would like to have
the following headings
Customer Copy - Print 1
Accounts Copy - Print 2
File Copy -Print 3
I created a macro to print the report three times, but do not know how
|
by: =?Utf-8?B?SGVyYg==?= |
last post by:
I'm using a ReportViewer in ASP.NET. From the development environment it
works fine. When published and I try to open the page with the ReportViewer I
get the error:
An internal error occurred on the report server. See the error log for more
details.
Do I have something configured wrong? I do not knw where to find the error
log to review it.
|
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...
| |
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: 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...
|
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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |