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

Linking form - Report

I have a form called frm_quote and a report called rpt_quote.
I want to be able to view the form on a particular quote number (field:
QuoteNo - autonumber) and then go to the report where the the info on that
particular quote no. is shown in the report.

frm_quote is linked to query: qry_viewquote
rpt_quote is linked to: qry_viewquoterpt

In design of qry_viewquoterpt - I simply have the expression (for the
field: QuoteNo ) [Enter Quote No]. This method does the job however I
would like it to automatically recognize the quote number as described
earlier without this manual input of the user.
thanks.

Nov 13 '05 #1
2 2396
It's a common solution to put a command button on your form that will open
your report. Set the criteria to limit your report to a value on the form.
An example:

Private Sub PrintForm_Click()
On Error GoTo Err_PrintForm_Click

Dim DocName As String
Dim LinkCriteria As String

DoCmd.DoMenuItem A_FORMBAR, A_FILE, A_SAVERECORD

DocName = "MemRecord"
LinkCriteria = "[V-ID] = Forms![MemEntry]![V-ID]"
DoCmd.OpenReport DocName, A_PREVIEW, , LinkCriteria

Exit_PrintForm_Click:
Exit Sub

Err_PrintForm_Click:
MsgBox Error$
Resume Exit_PrintForm_Click

End Sub

The command button wizard will do most all of this for you.
-Ed

"Gt394" <g4****@hotmail.com> wrote in message
news:43***********************@news.optusnet.com.a u...
I have a form called frm_quote and a report called rpt_quote.
I want to be able to view the form on a particular quote number (field:
QuoteNo - autonumber) and then go to the report where the the info on that
particular quote no. is shown in the report.

frm_quote is linked to query: qry_viewquote
rpt_quote is linked to: qry_viewquoterpt

In design of qry_viewquoterpt - I simply have the expression (for the
field: QuoteNo ) [Enter Quote No]. This method does the job however I
would like it to automatically recognize the quote number as described
earlier without this manual input of the user.
thanks.

Nov 13 '05 #2
On Wed, 28 Sep 2005 07:43:34 +1000, "Gt394" <g4****@hotmail.com>
wrote:

Take out the [Enter Quote No].
Then when opening the report using DoCmd.OpenReport, take a look at
the WhereClause argument. Set it to something like:
"QuoteNo=" & Me.QuoteNo

-Tom.

I have a form called frm_quote and a report called rpt_quote.
I want to be able to view the form on a particular quote number (field:
QuoteNo - autonumber) and then go to the report where the the info on that
particular quote no. is shown in the report.

frm_quote is linked to query: qry_viewquote
rpt_quote is linked to: qry_viewquoterpt

In design of qry_viewquoterpt - I simply have the expression (for the
field: QuoteNo ) [Enter Quote No]. This method does the job however I
would like it to automatically recognize the quote number as described
earlier without this manual input of the user.
thanks.


Nov 13 '05 #3

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

Similar topics

3
by: Colin Graham | last post by:
I have recently created a report in crystal(10) linking to a dataset as the datasource. I notice however that the fields available in the report all have STRING format and therefore i cannot change...
4
by: Mark T. | last post by:
Hi, I've got a simple DB (Office Win XP Professional). Basically, it's like a check book register - deposit, deduction and running sum. I'd like to somehow link it to an Excel spreadsheet that...
2
by: TheTamdino | last post by:
One of the things that is common between most genealogy databases is that they will have one screen were you log all the information for a given person and then (maybe) have a link to a source...
1
by: hmiller | last post by:
I'm sorry to populate the server with yet another question about linking multiple tables and queries, howerver I have not been able to find the right criteria. My problem. I am trying to...
4
by: schmidtmic | last post by:
I have a table that contains 20 checkbox fields. Each checkbox corrisponds to an Score amount. For Example: Checkbox1 is worth 10 points Checkbox2 is worth 5 points Checkbox3 is worth 2...
2
by: zaaza | last post by:
I'm trying to generate report within my visual basic 6 project. My problem is that i need just some specific records on the report at any given time. I create the recordset within the codes behind...
3
by: Parasyke | last post by:
I have a form that has a bound textbox displaying a picture path (in another folder) for an image (e.g. C:\Documents and Settings\My Documents\My Pictures\SymbolVRC 6940.jpg). I need this actual...
1
by: Parasyke | last post by:
I have a report that I want to print for a product specification sheet with a photo of the product. I have the photos stored in a separate folder from my Access 2000 database. I have a form that...
4
by: JPG4 | last post by:
I have tried just about everything that I can think of, so now I turn to you all for help! I have created a form (titled "OAG") with an unbound textbox titled "DOW". I also have a Query that I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.