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

Where command help

ok here is the question i have a code

sub
DoCmd.OpenReport "Report A", acNormal, , "[Medical Record #]=" & Medicalrec & " AND [Arrival time]=" & AT _
& " AND [Date Assessment Completed]=" & "#" & DAC & "#"


DoCmd.OpenReport "Report b", acnormal, , "[Medical Record #]=" & Medicalrec & " AND [Arrival time]=" & AT _
& " AND [Date Assessment Completed]=" & "#" & DAC & "#"
end sub

and this code is suposed to print the report based on the information given in the form
the problum is that when it moves to the next report it askes for the information in the form of a input box not from the specifiyed fields

thanx for taking a look
Mar 11 '08 #1
1 1474
Stewart Ross
2,545 Expert Mod 2GB
Expand|Select|Wrap|Line Numbers
  1. sub
  2. DoCmd.OpenReport "Report A", acNormal, , "[Medical Record #]=" & Medicalrec & " AND [Arrival time]=" & AT _
  3. & " AND [Date Assessment Completed]=" & "#" & DAC & "#"
  4.  
  5. DoCmd.OpenReport "Report b", acnormal, , "[Medical Record #]=" & Medicalrec & " AND [Arrival time]=" & AT _
  6. & " AND [Date Assessment Completed]=" & "#" & DAC & "#"
  7. end sub
  8.  
...the problum is that when it moves to the next report it askes for the information in the form of a input box not from the specifiyed fields
Hi Lokerin. Since the two calls to OpenReport are identical other than the report title, it suggests there might be field differences in the two reports. OpenReport will pop up a parameter box for the user to fill in any missing fields, so note down the name of the field or fields you are asked for, then check that report B includes all of the same fields with the same titles as report A. The recordsource does not have to be the same for both reports, although if it is this will make tracking down your error a bit easier, but at the very least the fields [Medical Record #], [Arrival Time] and [Date Assessment Completed] must be present in Report B for the OpenReport call as listed to work correctly.

(I added code tags to the extract from your post above to make it clearer to read.)

-Stewart
Mar 11 '08 #2

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

Similar topics

2
by: David | last post by:
I have a book which had code that includes the line: require 'DB.php'; I know that this is from the PEAR code modules, but when I downloaded them and unpacked the directory, they "DB.php"...
1
by: JackPhil | last post by:
I searched in the python-mode.el, sf.net, python.org, and found nothing Best regards
6
by: Waleed Seada | last post by:
Hi all I am new to C# I read the 'Oreilly.Programming.C.Sharp.3rd.Edition.eBook-LiB' I also finish 6 CD's of the learnkey I used to use PowerBuilder as a developing Tool, I need to know the same...
3
by: MikeY | last post by:
Hi everyone, I'm having problems with my WHERE Clause syntax with in my SQL CommandText. The error that it is display is "You Have No Data". My problem lies with in the WHERE clause not finding...
2
by: Eran.Yasso | last post by:
Hi, My app updates mdb file with no probelm. the problem starts if there's a space on a column name(header consists from two words). I tried all sorts of things. here is my code: private void...
2
by: sani8888 | last post by:
Hi everybody I am a beginner with C++ programming. And I need some help. How can I start with this program *********** The program is using a text file of information as the source of the...
1
by: DaveF | last post by:
Any Ideas as to this error message. I am trying to learn using ms sql server 7.0 Below is the code I am using for an update to a MS Sql Database. <%@ Language=VBScript %> <% Option Explicit...
4
by: cluce | last post by:
I am getting a syntax error but I cant seem to spot it. need help with this. Its when I click the save button that fires my SQL UPDATE query. thansk in advance 'module level declarations Dim...
2
by: jonathan184 | last post by:
Hi basically what i want this script to do is In a particular dir there are alot of files from today back to 1999 or earlier. So I am trying to have the script search this dir and sort the files...
3
by: =?iso-8859-1?q?KLEIN_St=E9phane?= | last post by:
Hi, for example, in http://svn.zope.org/zc.buildout/trunk/src/zc/buildout/ tests.py?rev=89831&view=auto test file, there is this doctests : def develop_verbose(): """ We should be able to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.