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

Troubles with date variable

17
hello guys,

my goal is to open with doubleclick a record in a datasheet a form where i can see the records full page with more informations. so i dblclick on the field IDate and the form opens with the correct date and according informations in the record of this date.

the modul looks as follows:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Info_DblClick (Cancel as Integer)
  2.  
  3.     DoCmd.OpenForm "InfoForm" ,,, "[IDdate] =" & [IDdate]
  4.  
  5. End Sub
my problem is, the form is always empty.

when i use the [infoID] instead of [IDate], then i get the correct record to the field [infoID]. but i want to use the IDate.

what do i do wrong?
Jul 1 '15 #1

✓ answered by Seth Schrock

Date values need hashtags surrounding them. So your WhereCondition clause needs to be
Expand|Select|Wrap|Line Numbers
  1. "[IDdate] = #" & [IDdate] & "#"

5 1693
Seth Schrock
2,965 Expert 2GB
Date values need hashtags surrounding them. So your WhereCondition clause needs to be
Expand|Select|Wrap|Line Numbers
  1. "[IDdate] = #" & [IDdate] & "#"
Jul 1 '15 #2
rod4
17
thanks a lot! i had this idea already too, but with the wrong syntax! :)
Jul 1 '15 #3
NeoPa
32,556 Expert Mod 16PB
Please check your questions carefully before posting. In various different parts of the thread you have referred to [IDate] & [IDdate]. It's very hard to work with unreliable information.
Jul 2 '15 #4
rod4
17
Sorry won't happen again!
Jul 5 '15 #5
NeoPa
32,556 Expert Mod 16PB
: - )
Jul 5 '15 #6

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

Similar topics

6
by: jim.kelly | last post by:
Hi all, I'm having trouble with the following line of code in my php script: $result = mysql_query('LOAD DATA LOCAL INFILE "NYSE_".$today.".txt" INTO TABLE main FIELDS TERMINATED BY "," LINES...
2
by: jessie | last post by:
I use a chinese version of Windows XP. And excute a vb script code to get a date value from a Excel file. The data value is in English format in the Excel file. But I found the vb script converts...
6
by: Mike | last post by:
Dim vDateE As String vDateE = #7/12/2005# The following works to find Cost in TblExpenses for 7/12/2005: MsgBox (DSum("Cost", "TblExpenses", "DateofPurchase = #7/12/2005#")) However I...
3
by: Mike L | last post by:
This is for a Win form. How do I check if the date variable is null? DateTime dtDOB = (DateTime) dgSportsman;
5
by: Andre Beier | last post by:
Hi, I have a date variable that initially contains any date. However, depending on user actions I want to set the value of the date var to Nothing. I tried the following: myDate = Nothing ...
3
by: menglin.cao | last post by:
Hi, I am trying to join two tables, one has multiple records per ID, the other is unique record per ID. The two tables look like below A ID date var1 var 2 001 1/1 10 20 001 2/1 ...
3
by: Liam Mac | last post by:
Hi All, Can anyone direct me or provide advice on how I can assign a null value to a date variable in vb.net. Basically what I'm doing is that I'm looping through a recordset where I have three...
8
by: Geezer | last post by:
I need to know how to name an output file in XP so that the file name looks like the following: 02/14/2007.qic Can I use the %date% variable and how would I do it?
5
by: gubbachchi | last post by:
Hi all, How to pass the php date variable to javascript function. Here is the code I have tried out, but this is not recovering the date correctly in the javascript function <html> <script...
3
by: dbdb | last post by:
hi guys need your suggestion how can i apply filter for my date variable data type i have a form name transaction and i have a text box on it named : start and finish i need to apply...
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: 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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.