Dim con As ADODB.Connection
Dim res As ADODB.Recordset
Function Getname1(custid As Integer) As String
Set con = New ADODB.Connection
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\joshi\vbcode\customer.mdb;Persist Security Info=False"
Dim str As String
str = "select Firstname + ' ' + Lastname from" & "cust where custid= " & custid
Set res = con.Execute(str)
Getname1 = res(0)
I HAD CREATED DLL OF ABOVE FILE AND I WANT TO USE GENTAME1
FUNCTION INTO OTHER PROJECT HOW TO ACCESS THIS FUNCTION.
i HAD CREATED,COMPILED AND REGISTERED THIS DLL INTO REGESTRY.ALL R WORKING PROPERLY.I CAN ADD THE DDL INTO ANOTHER PROJECT BUT NOT ABEL TO ACCEESS THE GETNAME1 FUNCTION.
IF ANY BODY CAN HELP ME THEN I WILL BE THAKFUL TO THEM.
Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.
What are they?
An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code.