-->>Hi,I'm having an Access database (.mdb) with Members table and column Date registered just for an Example with datatype as text.
-->>Now I have an Interface that I need to use it to get all registered members within the specified range of dates by using the Datepickers (1. Is for From and 2. Is for To) datepickes and the results will be shown on the listview after clicking the Go button.
-->>So far I have the following code:
Call Load_Members("SELECT Date_Registered FROM Members WHERE Date_Registred >=#" & DPK_From.Value & "# And Date_Registered <=#" & DPK_To.Value & "#")
-->>The Call Load_Members is declared in the module
-->>But when I run the Application I get a Run time Error '-2147217904(80040e10)' No value given for one or more required parameters.
-->>On other hand I did the same thing by using ado and write the following code which did exactly what I wanted
If adoWeekly.Recordset.Fields("Date_Regitered").Value >= (txtStart_Date.Text) And adoWeekly.Recordset.Fields("Date_Regitered").Value <= (txtEndDate.Text) Then
-->>So iz it that I'm required to set the condition first or? Thanx in advance.

Recommended Answers

All 4 Replies

You need to supply more information. Such as:
What is the actual subroutine/function declaration?
What is the actual statement that gets the error?
What are the actual control names?
What are the actual column names ("Date_Registered" <> "Date_Registred" <> "Date_Regitered")?
You can't seriously expect help if you don't supply real code. At the risk of sounding like Jerry Maguire, "Help us to help you".

-->>Ok,BitBit I thought that everything is clear,I tried to give a lot of information here

What is the actual subroutine/function declaration?
-->>I think your refering to:
Call Load_Members("SELECT Date_Registered FROM Members WHERE Date_Registred >=#" & DPK_From.Value & "# And Date_Registered <=#" & DPK_To.Value & "#")
-->>The line that gets an error is:RS.Open Strin, Conn, adOpenDynamic
-->>Its in my module Load_Members(Strin As String)
What are the actual control names?
-->>I have two datepickers as shown here
Datepickers (1. Is for From and 2. Is for To)
DPK_From.Value
DPK_To.Value
-->>Clearly shown on the SQL Clause
"SELECT Date_Registered FROM Members WHERE Date_Registred >=#" & DPK_From.Value & "#
What are the actual column names
-->>I only look for valid value/date from one column in my table but the column should satisfy both conditions its name is:
Date_Registred
You can't seriously expect help if you don't supply real code. At the risk of sounding like Jerry Maguire, "Help us to help you".
-->>I hope I made it clear NOW?
-->>Tanx for your advice.

Hi,

isnt it a spelling mistake of the field:

WHERE Date_Registred

should be:

WHERE Date_Registered

Regards
Veena

-->>QVeeen72,Thanks a Lot...
-->>Your doubt opened up my EYES!!! it's' not the spelling that mattered in my code it was just the typing Error here but in the development area its fine.
-->>The thing is... in the development area I was trying to filter from another table Members while the actual data was from Registered table as:
Call Load_Members("SELECT Date_Registered FROM Members WHERE Date_Registred >=#" & DPK_From.Value & "# And Date_Registered <=#" & DPK_To.Value & "#")
-->>While it was Supposed to be like:
Call Load_Members("SELECT Date_Registered FROM Registered WHERE Date_Registred >=#" & DPK_From.Value & "# And Date_Registered <=#" & DPK_To.Value & "#")
-->>It worked perfect and nicely.
-->>Thanks a lot BitBit and Veena

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.