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

form object

Hello

I am really confused on this.
I have a button that calls a module.

Sub verifyUser(frmEntry As Form)
This module does a few things then it opens a form.

I am passing a variable as form to the module
call verifyUser("frmFollowUp")

If add quotes it says type mismatch if I remove the quotes it says
"Byref argument type mismatch"

I don't know what I am doing wrong.
Please help.

Thanks.

Simone
Nov 12 '05 #1
5 4772
You are defining frmEntry as a Form, but you are passing a form's name (a
string value), not a form.

--
Wayne Morgan
Microsoft Access MVP
"Simone" <oi****@hotmail.com> wrote in message
news:fc**************************@posting.google.c om...
Hello

I am really confused on this.
I have a button that calls a module.

Sub verifyUser(frmEntry As Form)
This module does a few things then it opens a form.

I am passing a variable as form to the module
call verifyUser("frmFollowUp")

If add quotes it says type mismatch if I remove the quotes it says
"Byref argument type mismatch"

I don't know what I am doing wrong.
Please help.

Thanks.

Simone

Nov 12 '05 #2
Thanks before you posted I changed to string and it worked.
My issue now is I need it to be a form object because once runs
through the code I want to pass a value to a text box for that form
object. Using text I can't do frmEntry.controlname
I tried passing but I get the same error before.

Any ideas?
Thanks.

"Wayne Morgan" <co***************************@hotmail.com> wrote in message news:<mS*******************@newssvr32.news.prodigy .com>...
You are defining frmEntry as a Form, but you are passing a form's name (a
string value), not a form.

--
Wayne Morgan
Microsoft Access MVP
"Simone" <oi****@hotmail.com> wrote in message
news:fc**************************@posting.google.c om...
Hello

I am really confused on this.
I have a button that calls a module.

Sub verifyUser(frmEntry As Form)
This module does a few things then it opens a form.

I am passing a variable as form to the module
call verifyUser("frmFollowUp")

If add quotes it says type mismatch if I remove the quotes it says
"Byref argument type mismatch"

I don't know what I am doing wrong.
Please help.

Thanks.

Simone

Nov 12 '05 #3
Forms!frmEntry!ControlName

--
Wayne Morgan
MS Access MVP
"Simone" <oi****@hotmail.com> wrote in message
news:fc**************************@posting.google.c om...
Thanks before you posted I changed to string and it worked.
My issue now is I need it to be a form object because once runs
through the code I want to pass a value to a text box for that form
object. Using text I can't do frmEntry.controlname
I tried passing but I get the same error before.

Any ideas?
Thanks.

"Wayne Morgan" <co***************************@hotmail.com> wrote in

message news:<mS*******************@newssvr32.news.prodigy .com>...
You are defining frmEntry as a Form, but you are passing a form's name (a string value), not a form.

--
Wayne Morgan
Microsoft Access MVP
"Simone" <oi****@hotmail.com> wrote in message
news:fc**************************@posting.google.c om...
Hello

I am really confused on this.
I have a button that calls a module.

Sub verifyUser(frmEntry As Form)
This module does a few things then it opens a form.

I am passing a variable as form to the module
call verifyUser("frmFollowUp")

If add quotes it says type mismatch if I remove the quotes it says
"Byref argument type mismatch"

I don't know what I am doing wrong.
Please help.

Thanks.

Simone

Nov 12 '05 #4
ps. The period will work also.

Forms!frmEntry.ControlName

--
Wayne Morgan
MS Access MVP
"Simone" <oi****@hotmail.com> wrote in message
news:fc**************************@posting.google.c om...
Thanks before you posted I changed to string and it worked.
My issue now is I need it to be a form object because once runs
through the code I want to pass a value to a text box for that form
object. Using text I can't do frmEntry.controlname
I tried passing but I get the same error before.

Any ideas?
Thanks.

"Wayne Morgan" <co***************************@hotmail.com> wrote in

message news:<mS*******************@newssvr32.news.prodigy .com>...
You are defining frmEntry as a Form, but you are passing a form's name (a string value), not a form.

--
Wayne Morgan
Microsoft Access MVP
"Simone" <oi****@hotmail.com> wrote in message
news:fc**************************@posting.google.c om...
Hello

I am really confused on this.
I have a button that calls a module.

Sub verifyUser(frmEntry As Form)
This module does a few things then it opens a form.

I am passing a variable as form to the module
call verifyUser("frmFollowUp")

If add quotes it says type mismatch if I remove the quotes it says
"Byref argument type mismatch"

I don't know what I am doing wrong.
Please help.

Thanks.

Simone

Nov 12 '05 #5
Simone wrote:
Hello

I am really confused on this.
I have a button that calls a module.

Sub verifyUser(frmEntry As Form)
This module does a few things then it opens a form.

I am passing a variable as form to the module
call verifyUser("frmFollowUp")

If add quotes it says type mismatch if I remove the quotes it says
"Byref argument type mismatch"

I don't know what I am doing wrong.
Please help.

Thanks.

Simone

I may be wrong, but I think that you need to do this BEFORE you do the call:
DIM frmVar as form
set frmVar = frmFollowUp
call verifyUser(frmVar)

(I'm not 100% certain about the syntax for the SET command, you may need
to look into that)

Hope this helps a little - or a lot :)
Nov 12 '05 #6

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

Similar topics

1
by: Matt | last post by:
Hi group, Here's a problem I've been trying to solve for the past several weeks. I have the standard WebBrowser object added to a form so it can access websites, and I have it load a default...
15
by: mike | last post by:
I'm drawing a blank on this. I have html like: <form name="test1"> <input name="inp1" onclick="alert(this.parent.form);"> <a href="javascript:void(null);"...
2
by: Roby Eisenbraun Martins | last post by:
Hi, My name is Roby Eisenbraun Martins, I am a C++, VB and NET developer. I am working with a NET 2002 project right now and I am receiving this uncommon "OutOfMemory" error message when I try...
3
by: BakelNB | last post by:
I am new to the .Net environment, so please bear with me. I am passing a form object (e.g. formA) to an existing form (e.g. formB) by setting a property value defined in formB to hold the formA...
0
by: pm.thirumalai | last post by:
Hi. I am having problem to get a form object from VB6 to .NET. We are having a dll (ActiveX EXE) which is functioning the common task handing in all of our projects. say, the Dll Contains ...
1
by: Kevin S Gallagher | last post by:
I found this code (pretty sure it was from a MVP) for converting a string variable to a form object which works fine within a form. Take the code and place it into a code module and it fails on the...
0
by: Tim Marshall | last post by:
A2003. I would desperately like to have a similar ole object on a report object such that when the report is printed, it takes all the properties of a similar object on the form. In this case,...
2
by: Blackmore | last post by:
I am trying to use javascript to calculate the difference between two form inputted dates and return the result to another form object. When I load up the page with the function on my web browser...
4
by: rlntemp-gng | last post by:
I have one module where I would like to launch 2 different forms (that do exist), based on a form object and string that is passed into it. (prmTable is a string, not a table object simply because...
1
by: mirandacascade | last post by:
1) Module1 has the following delcaration: Public g_frmZZZ as Form Public g_txtForm2 as Variant 2) app has two forms: form1 and form2 3) a command button on form1 opens form2; it also has...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
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
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...

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.