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

MS Access stLinkCriteria Between Dates

4
Hi,

I have a filtered form that produces a set of employee names that are hyperlinks. When clicked, the EmployeeName hyperlink opens another form called Budgeted Time. I would like to filter the results of Budgeted Time to match the employee name and corresponding date range produced from the filters on the first form. The date fields are called txtstartdate and txtenddate. Many thanks for looking

Expand|Select|Wrap|Line Numbers
  1. Private Sub EmployeeName_Click()
  2. Dim stlinkcriteria As String
  3. stlinkcriteria = "[budgetdate] is between #" & [txtStartDate] & "# And #" & [txtEndDate] & "#" And "[EmployeeName] = '" & EmployeeName & "'"
  4. DoCmd.OpenForm "Budgeted Time", , , stlinkcriteria
  5. End Sub
  6.  
Sep 8 '10 #1
2 2661
MikeTheBike
639 Expert 512MB
Hi

You do not indicate what the problem actualy is that you are having, but I would start by moding the code thus
Expand|Select|Wrap|Line Numbers
  1. stLinkCriteria = "[budgetdate] is between #" & Format([txtStartDate], "mm/dd/yy") & "# And #" & Format([txtEndDate], "mm/dd/yy") & "#" And "[EmployeeName] = '" & EmployeeName & "'"
MTB

p.s. this does not seem to be a hyperlink to me!?
Sep 9 '10 #2
JpjVB
4
MTB,

Thanks for getting back to me. Let me provide a little more detail. The field [EmployeeName] has its Is Hyperlink property set to Yes, and the above code is triggered on its On Click event procedure. The event opens a new form for that employee with a budget date within the range of the dates selected in txtstartdate and txtenddate in the original form's filter. The code produces a Run-Time Error '13': Type Mismatch.

I hope this is helpful, thank you again for looking.
Sep 9 '10 #3

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

Similar topics

38
by: Remco Groot Beumer | last post by:
Hello, I'm trying to decide if the following situation would be workable: Generate an MS Access Front End (which will run localy on client computers), which will link to a DBMS (SQL server or...
4
by: John M | last post by:
Hi, I have spent some time trying to sort out a date problem (see mail an hour or so ago) and am now getting to see what the problem is. If I present today's date as 07/02/2004 in a search it...
1
by: Jacquo Johnson | last post by:
I am receiving the following error: MS Access Date/Time DBD::ODBC::st execute failed: , , " . "FROM WHERE > '2004/02/01 11:16:16'"; $sth = $dbh->prepare($sqlstatement); $sth->execute ||...
5
by: Fabian | last post by:
I am making a winforms-program in Visual Studio, that connects to an Access database. In the database all dates are presented in this format : dd-mm-yyyy. In my application I have a DatetimePicker,...
5
by: jim Bob | last post by:
Hi, Does anyone know how to make 1 date field 6 months ahead of another in ms access? Eg, I have a field called "startdate" where a date is entered. I want "offprobationdat" equal to startdate +...
5
by: Henning M | last post by:
Hi all, I having some problems with Access and selecting records between dates.. When I try this in access, it works fine!! "Select * from Bilag Where Mdates Between #1/1/2006# And...
8
by: saladinator | last post by:
I have created an Excel spreadsheet that has a lot of data. What I want to do is import the spreedsheet to Access and create a form so that I can print each row per page in a proffessional manner....
3
by: shiznaw | last post by:
I got another problem while working on this database for the Univ. The Form.viewreports has several radial button options so that the user can view a Report for several periods--like a day, a...
5
by: pyroguanyu | last post by:
this is the first time i have used access. and i have been assighnd the job of getting queries of hh/mm/ss, there is 20487 entrees that i need to dived up into four time frames but the problem is...
2
by: JohanKotze | last post by:
I design a report that will show all the records for a particular client and all the records do show in the report BUT when I try to search between dates than only half of the records are showing...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.