Having problems with locating date values 
Author Message
 Having problems with locating date values

Hi there! I created a function that looks for a specific date value (well,
at least that it is supposed to do so) but until now, I have not
accomplished this goal yet.

I will show you the code:

Function fmbSeekDate(datFecha as Date) as Integer
        Dim dbs as Database
        Dim rst as Recordset
        set dbs = currentdb( )
        set rst = dbs.openrecordset(tablewhereIhavethedatefield)
        with rst
                .index = "Nameofdatefield'sIndexName"
                .seek "=", datFecha
                if .nomatch then
                        fmbSeekDate = False
                        fmbSeekDate = True
                End If
        End With
End Function

The problem is (as I have found) that the function's argument datFecha,
once passed to the function itself, (I don't know why and how, but for some
reason), such variable is converted to a particular time value.

For example:
First of all, I have a table where I've already stored (let's say)
'03/31/97' date.  When I use the funcion to locate such record, it always
returns to me False, and as I've described it earlier, I think it is
because of the conversion from date to time (the variable datFecha once
inside the function looks something like 12:56:00 AM).

If you have any suggestions, I'll be glad to read them
Thanks in advance
Felix Melendez
Managua, Nicaragua

Mon, 27 Dec 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Problem using Findfirst to locate date value

2. How to save MaskEdBox Blank Date Value having Mask ##/##/####

3. I'm having a problem with a date variable

4. Having problems binding a mask control to a date field

5. Having a date problem

6. Having the Sound Events sound file located in a DLL

7. Write nonstring value to INI having no such value yet

8. Problem w/ Ref and Date Value

9. Using unbound textbox to locate values in a datagrid 2nd time

10. Using unbound textbox to locate values in a datagrid 2nd Time

11. Using unbound textbox to locate values in a datagrid

12. Locating Position and Value in a DBGrid ?


Powered by phpBB® Forum Software