473,405 Members | 2,310 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,405 software developers and data experts.

VB6 dll passing dates

dear gurus can you check i had written dll file in vb6 and call in
access added via reference.

here are the coding of dll file
+++++++++++++++++++++++++++++++++
Public Function f_Dtloan(dt_dob As Date, Dt_loan As Date) As Date
ageEntry = DateDiff("yyyy", "# & dt_dob & #", "# & Dt_loan & #")
End Function
+++++++++++++++++++++++++++++++++

as you know the function is written in dll, so we need to call it then
pass the value.and here are the coding of forms buttons:
+++++++++++++++++++++++++++++++++
Public objDate As New Project1.basDate

Private Sub Command1_Click()
MsgBox objDate.f_Dtloan(Text2.Text, Text1.Text)
End Sub
+++++++++++++++++++++++++++++++++
so can any one check it gives me results zero "0" always i don't know
where i am making mistakes in VB6 or VBA coding is 99% same
rgds,
shahzad

Nov 13 '05 #1
2 1219
On 25 Jan 2005 21:32:24 -0800, "SalimShahzad" <sa**********@gmail.com>
wrote:
dear gurus can you check i had written dll file in vb6 and call in
access added via reference.

here are the coding of dll file
+++++++++++++++++++++++++++++++++
Public Function f_Dtloan(dt_dob As Date, Dt_loan As Date) As Date
ageEntry = DateDiff("yyyy", "# & dt_dob & #", "# & Dt_loan & #")
End Function
+++++++++++++++++++++++++++++++++

as you know the function is written in dll, so we need to call it then
pass the value.and here are the coding of forms buttons:
+++++++++++++++++++++++++++++++++
Public objDate As New Project1.basDate

Private Sub Command1_Click()
MsgBox objDate.f_Dtloan(Text2.Text, Text1.Text)
End Sub
+++++++++++++++++++++++++++++++++
so can any one check it gives me results zero "0" always i don't know
where i am making mistakes in VB6 or VBA coding is 99% same
rgds,
shahzad


don't post VB problems into an Access Newsgroup (further on in a Group
without VBA)

you define a function as Date, you calculate a number (without
defining it) and you never assign a result to your function.
---
If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
Nov 13 '05 #2
On 25 Jan 2005 21:32:24 -0800, "SalimShahzad" <sa**********@gmail.com>
wrote:
dear gurus can you check i had written dll file in vb6 and call in
access added via reference.

here are the coding of dll file
+++++++++++++++++++++++++++++++++
Public Function f_Dtloan(dt_dob As Date, Dt_loan As Date) As Date ageEntry = DateDiff("yyyy", "# & dt_dob & #", "# & Dt_loan & #")
Try:

ageEntry = DateDiff("yyyy", "#" & dt_dob & "#", "#" & Dt_loan & "#")
End Function
+++++++++++++++++++++++++++++++++

as you know the function is written in dll, so we need to call it then
pass the value.and here are the coding of forms buttons:
+++++++++++++++++++++++++++++++++
Public objDate As New Project1.basDate

Private Sub Command1_Click()
MsgBox objDate.f_Dtloan(Text2.Text, Text1.Text)
End Sub
+++++++++++++++++++++++++++++++++
so can any one check it gives me results zero "0" always i don't know
where i am making mistakes in VB6 or VBA coding is 99% same
rgds,
shahzad


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Max | last post by:
I'm new with Javascript and can't seem to figure out what I'm doing wrong here as I'm not able to pass a simple variable to a function. In the head of doc I have: <script...
1
by: Michael DeLawter | last post by:
Using Access 2002. I have a chart in a report that is currently based on a query in which the user enters the start and end date for the chart to display. Both the start and end dates have been...
1
by: panche | last post by:
I'm developing a fairly simple user control that has two textboxes for date/time entry (a from date/time and a to date/time). One of my requirements is that there should be no button that sets...
2
by: Yvon | last post by:
I have a report in a form and it's running fine. I would like to have the same report filter between dates passed form a DateTimePicker to show all records between the two dates. Any help
1
by: Lauren Quantrell | last post by:
I already figured out (the hard way) I need to convert all my date parameters into USA format before executing my stored procedures where dates are used as parameters. (Format(StartDate, "m/d/yyyy...
9
by: laurenq uantrell | last post by:
I've gotten sort of fed up with dealing with regional date settings on the client side and am considering the following scheme - just wondering if anyone has a negative view of it or not: ...
0
by: skinnybloke | last post by:
Hi I have written 3 seperate macros in access to run 3 queries to export 3 .xls files. Sometimes I will need to run them individually. Sometimes I will need to run them all together...
2
by: MobiusDick | last post by:
Hi All, I'm in the process of creating a database that allows users to enter details into a form which includes a date range as start and end dates. I have used the inbuilt Calendar Control...
3
by: Mike P | last post by:
I am entering two dates into textboxes and using them as control parameters in an SQL DataSource which is being used to populate a gridview. I am using a custom validator to check if the data...
0
by: =?Utf-8?B?UGF1bA==?= | last post by:
I have a ListBox server control named "lb_dates" with a SelectionMode of "Multiple". The user can select multiple dates from the listbox. I have ObjectDataSource named "ods_rfq" with a...
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.