473,396 Members | 1,933 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,396 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 1694
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: 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...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.