How to access a private function -
i ahave a .dob file
which has all private functions
private sub validate()
private sub cbo_change()
etc
I have to write a public sub click()
then have to call a private sub validate() in this click()
how can I do that ...
Thanks in advance.
Accessing VB FUnctions -
Forum Index | FAQ | Edit Profile | Send Private | Check Private | Top 10 | Search | Unanswered | Logout
Visual Basic Programming
Subject Accessing variables from functions
Category ActiveX
Posted by VijayGade on 2/15/02 at 01:17 am
Rating not r
Access from VB -
Hello,
I have a function which opens Access, executes another function in a module in the database and then closes Access. The problem is that I don't want the user to see the Access window while executing the function, but I don't know how to hide it. I've already tried to use Visi
Calling Private Function -
You can put any functions you want both forms to access in a module.
You can create a class that both forms can access.
You can declare a public function in form B. Set a reference to form B in form A. Then access the function through the reference.
I think either of the firs
How to access a private function -
i ahave a .dob file
which has all private functions
private sub validate()
private sub cbo_change()
etc
I have to write a public sub click()
then have to call a private sub validate() in this click()
how can I do that ...
Thanks in advance.
Access private sub's variable -
For example i have:
Private Sub test ()
static count as integer
end sub
How can i access "count" from other private functions??
i need to change the value of count from other function
can i do it??
Thanks
How to use HTML Object Library events -
I want to put some HTML object events in my VB6 project; like the following, for example:
Code:
Private Function HTML_ondragstart() As Boolean
End Function
Private Function HTML_ondragover() As Boolean
End Function
Private Function HTML_ondragend() As Boolean
End Functio
Split() for Access required -
Access does not let me use Split() to split a delimited string into an Array, does anyone have some code for this?
I don't think an array can be passed back by an Access function so could it be global at Module level?
Private Function SplitString(str As String, sDelim As String
Access question: Resolved -
I have a VB6 app that calls an access query.
Inside the access query is a function that I have built in the access db.
My problem is when I run the VB app the access VBA code editor opens and I have to step through the function to continue running the app.
Does anybody know ho
Does a class calling it's own fucntions requires "Me" -
Does a function in a class that calls other functions in the class to access private variables, require the "Me" predicate? Ex: Me.getP1()
For example (... means code in btwn)
Quote:
Class1.cls
---------------
Private var1 as string
Private var2
Sniffer API Function to find Access DataBase. -
Hi there,
I just found yesterday a API Function that will determine whether Access is installed or not !!!.
Now my question is if there would be a possibility that an API Function can also determine if Access is a 2000 or 97 Version ???.
Thanks aktell GER/NZ
.
Need suggessions on Multithreading in Visual Basic 6.0 -
Hi,
I was using VisualBasic 6.0. I need to implement multithreading concept in visual basic. for this i was using kernel32.dll and creating the threads as shown below.
Private Declare Function CreateThread Lib "kernel32" (ByVal lpThreadAttributes As Any, ByVal dwStackSi
Dll Hell...........o Gurus -
I have a rather difficult questoin I am yet to have any insight on. I know the name of a function that resides inside of a dll. But at runtime, I don't know what the actual name of the dll is. If I want to access the function, I can't use a public declare function because you have to k
AddItem doesn't work in Access 2000 -
Hi,
I have a function (see below):
Private Sub PopulateCboYear()
Dim iYear As Integer
For iYear = 1900 To Year(Now())
cboYear.AddItem (iYear)
Next
End Sub
When I call PopulateCboYear, 4-digit years are populated to a combo box on the main form. The code w
Access function returning a collection -
Hey,
I have a VBA program in Access and I just created a new function.
I want it to return a collection of objects that I create inside the function.
Code:
Private Function GetADPOrderDetails(OrderID As Long, AgencyID As Long) As Collection
Dim blah As New Collection
VBA (Access) question -
Is there anyway to write a function in Access VBA.. and then use VB 6 to call the function from with in the Access DB?
Or a suppose a simpler way of asking this is: can I run a user defined Access Macro from VB6 (the macro would call the function writtin in VBA)?
if so... how?
Executing Access Query that uses a VB function -
Hi!
I have written a query inside Access that uses an Access VB Module public function. I use it to do some conditional processing. Although the query works fine through Access, VB reports an "Undefined Function" error
when I try to execute the query using the
Access 2000 AddItem -
Hi,
I developed a form in Access 2003 which has a combo box in it. The combo box displays all the years since 1900 until the current year. I created a function called PopulateCboYear and called the function when the form is loaded:
Private Sub PopulateCboYear()
Dim iYear As
OOP Question -
How can I used the object called babs and use one of its properties in the class it is delcared from. Specificlly I am calling the Connect method and I need the underlying function to use the _datastoreType that was setup up for this object. _datastoreType is a place holder for the
Protected access vs. Private access -
Some programmers prefer not to use Protected access because it breaks the encapsulation of the base class. Discuss the relative merits of using Protected access vs. insisting on using private access in base classes.
anyone got any idea?
queries with custom functions -
Hello,
I created a module in MS Access with a function that I use in queries that I run which trim out all of the non A-Z and 0-9 characters. It runs in Access perfectly. So then I wrote a VB program that connected to this same Access DB, I put that function I wrote in my VB progr
Using .hWnd method in Access DB -
Attempting to us the following in an Access DB to search a listbox
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
Private Const LB_FINDSTRING = &a
MS access strange behaviour -
I have a vba function that runs in MS Access.
the function ends with closing the current form. the function completes ok with no errors, but for some reason the form is not close half of of the time.
any ideas why?
the code has the following structure
function X ()
on er
SetTopmostWindow..... -
I got this code a couple of days ago and it works great.
However, I don't understand it, and don't have access to
a book or MSDN or anything.
Can anyone comment it for me?Like this:
visual basic code:
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As
About Use Function and sub -
example :
private sub callfunction()
try
savedata("insert into ....")
with cm.....
..
...
Catch ex As Exception
end try
end sub
private function savedata(str as string)
with cm
...
..
end function
question :
if have error ha
Custom Variable into Access Database -
I am to generate a random automatic PIN code for all the members (people) in the Access 2003 database table. I had already written a function for this purpose but found out later that Access does not take the output of a user function as data. So I started it in VB.NET...
So far so
how to access private members -
How can I access picturebox created dynamically as a private member in function1, in the click event of the menuitem of the context menu.
for eg: if I have a picturebox created at runtime and if that picturebox also has a conetxt menu attached to it programatically and the menu look
Private Declare Function -
Private Declare Function IcmpCreateFile Lib "icmp.dll" () As Long
Thier is a the line of code thats giving me Trouble I have a few other lines Similar to that one with "Private Declare Function"..
When i go too Debug and Hit Run I get the Following Error Mess
User-defined functions in SQL using Access vs. VB6 & DAO 3.6 -
I have an Access database wherein I've created a querydef object in which one field in the querydef is an expression representing a user-defined function from a VBA module in the database.
This user-defined function creates a recordset based on the parameter passed, parses the recor
Access Sql Query -
hi,
i wan to ask few question bout using sql to select result from access db.
1, do access have such Counter function when i select?
select 'blahblah As No, Name FROM Customer;
so many result may come out like this:
1 John
2 Alex
3 Billy
2, do access have such LIMIT fun
static / friend functions -
Is it possible to either...
a) Allow a static member function to access private / protected members of the class
b) Brings a friend function into the same namespace as the class it befriends
Why? Because I want to do something like this:
Code:
CTextFile* text = CTextFile
Access Reports error -
This code had been working for a while, then it just stopped and threw the error 'System.Runtime.InteropServices.COMException' and said "Additional information: Microsoft Access can't find the object 'rptRegionalRegistrationsComparison.'"
The report is there. I don't thin
.dll for Split function -
Hi, all,
I'm sure many of you know that the Split function can't be used in Access 97.
Does anyone know if there is a .dll for this function that I can find somewhere? I could make Access 97 reference this .dll. That way, I'd be able to use the Split function. Thanks in advance.
Peculiar Thing -
Today i obesrved 1 peculiar thing in my vb project. it's not a serious problem actually, but surprised me.
From the exe of my application i can access 1 public function defined in the .bas module.
but from the vb ide, i can't access the same function, it gives some memory excepti
sub & function -
g'day evryone,
when i must use private sub/public sub and private function/public function?
what is the difference between this two statements,
thanx in advance,
public private functions **Resolved** -
In my class I have functions , when reading tutorials on PHP the text (and often code comments) this function is private and that function is public. There is no public/private keyword specified as with other languages.
How do we specify public/private and looking at other peoples co
VBA, Lock access window size, disable max button -
hello there,
i have made an access application for work, works great, but...
I have one headform, that should be maximized in the access window at all time.
The formsize itself is most of the time (depends on screen res.) smaller than the access screen when the access window is m
Access Date() function works on his machine but not mine -
Hi Folks
Im getting a "unknown function 'date' in validation expression or default value" when using a date() function in a field. My mate who created the database has no problems on his nt workstation or his win 2k laptop.
Im getting this error when I try to create a new
Private Declare Function Error Help -
Private Declare Function IcmpCreateFile Lib "icmp.dll" () As Long
Thier is a the line of code thats giving me Trouble I have a few other lines Similar to that one with "Private Declare Function"..
When i go too Debug and Hit Run I get the Following Error Mess
Exposing a function in a C++ exe for a VB application to access it -
I have a C++ prgram which compiles into a single EXE (no additional DLL's, etc).
I want my VB application to access one of the functions in it. Due to the multi-threading nature of the C++ exe, I can't make it into a DLL and export the function. Is there a way I can keep that C++
Pass ToolTip in form -
If I want to access the ToolTip1 object in the form, and the form is passed as parameter name in one public function. How to access the ToolTip1 object inside the function? Assume you are not allowed to add more property to calling form and the function only take System.Windows.Forms.F