473,387 Members | 3,033 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,387 software developers and data experts.

RunID printing current record only

Hello

I am using the following code to try to get a report to show a single record by clicking a command button in a sub form (perhaps it doesnt work because its a sub form not a form?) The mainform holds the primary key and subform displays the data.

My other complication is that the primary key is a combination of 2 fields, however, before I even get to this part, when I enter a different field name in the RunID part of the code which is unique, the report previews, but for all my records.

So I have 2 problems I guess
1 - Why is it showing all records and not just one?
2 - is there a code that I can borrow for when the RunID needs to be a primary key made up of 2 fields?

Thanks a lot scripting dudes


Dim strDocName As String
Dim strWhere As String
strDocName = "myreport"
strWhere = "[RunID]=" & Me!RunID
DoCmd.OpenReport strDocName, acPreview, strWhere
Jun 23 '06 #1
0 1271

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

Similar topics

10
by: Jeroen van vliet | last post by:
I have a program that when clicked i want to print 2000 papers, with the names adress etc of customers. So it have to print every record. How to manage it? Jeroen
2
by: gerb | last post by:
Hello, I realise this is not a pure Javascript question, and that VBscript is probably involved at some point, though not as much as I fear. If you opened this item looking for a pute Javascript...
4
by: John | last post by:
Hi Is there a way to print/e-mail the current record as it appears on a form? Thanks Regards
4
by: Sami | last post by:
I hope someone will tell me how to do this without having to do any VB as I know nothing in that area. I am a rank beginner in using Access. I have created a database consisting of student...
5
by: John | last post by:
Hi If I have a form open, what is the code that is equivalent to using the File->Print menu with select record(s) option to print the form with the currently displayed record values? Thanks ...
5
by: bobh | last post by:
Hi All, A clients database (built by another and not very well but, its what I have to work with) has bound forms that display customer information and when printed is three pages long. The...
4
by: paquer | last post by:
Hello' How do I get the subform to print along with the main form? I want my user's to be able to go in the field with a printout of the info they need to populate in the database. So when they...
1
by: paquer | last post by:
I have forms that are used in the office as well as in the field. I want user's to be able to print out an exact copy of the form for "in the field" data entry. (Yes we are still stuck in the 90's....
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...

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.