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

Opening ms access report based on dates

1
Hello am trying opening a report from a form based on the current record selected which is a date but it cant display the specified DATE record it only diplays all dates please help me with this.....?

THIS FORMULAR WORK WITH OTHER RECODE'S BUT NOT DATES
WHERE CONDITION: ="DATE_PAID=" & [DATE_PAID]
OR
VISUAL BASIC: DoCmd.OpenReport "TUTION_R", acViewPreview, , , , "DATE_PAID = " & Me.DATE_PAID
Aug 8 '22 #1
3 8790
NeoPa
32,554 Expert Mod 16PB
Hi there.

Welcome to Bytes.com.

Let me start by advising that using capitals as you have is considered shouting on the web. You should understand that it's no less insulting or annoying in this context than it would be in real life - so please avoid it in future.

Otherwise, your issue is a very common one. Made worse by the fact that the approach you use generally works in America - but rarely elsewhere. As much of the coding work and examples posted comes from there, and many (Not all but many.) there don't realise the extra complications of portability across national boundaries, there are a lot of examples that won't work reliably outside of that great nation.

For details see Literal DateTimes and Their Delimiters (#). It should tell you everything you need to know on the subject.
Aug 8 '22 #2
DJRhino1175
221 128KB
I do something similar, but not with dates. Here is the code I use and should get you what you want.

Expand|Select|Wrap|Line Numbers
  1. [Field]=[Forms]![Form Name]![Field]
Aug 9 '22 #3
NeoPa
32,554 Expert Mod 16PB
No DJ!

That is absolutely not the right way to handle dates within a SQL string. It works in America - but pretty much nowhere else. Did you even read what I wrote before posting that unhelpful addition to the subject? Date literals should always be strings that are formatted specifically for SQL. The use of default formats is incompetent and lazy, and only for those who haven't yet been told how to do it properly. No-one here any longer has that excuse.
Aug 9 '22 #4

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

Similar topics

8
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...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
1
by: A49553 | last post by:
I am trying to e-mail reports from Access that are based on pass-through queries going to an Oracle database. I am using Access 2003 on a Windows XP OS. I was able to e-mail these on my previous PC...
32
by: wexx | last post by:
I have been looking for some time now (reading books off Safari, searching through forums,etc) I have found no solution to this problem. I turn to anyone of you that may be able to help me. I'm...
0
by: ChadK | last post by:
I am trying to open a report based on what the user selects on a form. Each individual criteria works but when I try to combine to pass multiple criteria it doesn't. I have read what I can find on...
2
by: ccwells | last post by:
Hi, I am a novice to VB, using Access 2003 on a XP-SP2 platform, and I have a small database for tracking expenses, and want to be able to filter my expense report by date. I currently have a...
13
by: masteraccess2008 | last post by:
I create in Access report based on user defined function(UDF) in SQL Server which returns table. CREATE FUNCTION MyFunc_VP (@VP varchar(12)) RETURNS TABLE AS RETURN (SELECT...... In Access,...
4
by: jimmcg | last post by:
how can i limit the records seen in an access report based on a subtotal amount?
2
by: fredmart | last post by:
Hi, I'm having problems finding a way to apply conditional formatting based on comparing the text contents of two fields in two different tables. What I'd like to do: I've got two tables that...
0
by: theaidencarl | last post by:
Hi everyone, I am currently working on an MS ACCESS database for one of our departments. I am currently stuck, wondering how I can make it less tedious and won't make the application crash due to...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...

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.