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

repost calling a subform from another form(not main form)

ken
Hi,
I have a MainForm and a SubForm. I also have a popup form that is
opened by a button click on the subform. On that form I want to set the
main form and subform.

to set mainform you do this:
dim f as form
set f = forms("MainForm")
---this works

I don't know how to set the subform though...
I tried this:
dim sf as subform
set sf = forms("MainForm!Subform") but this does not work...

any help appreciated...using Access 2000.
Thanks

Nov 13 '05 #1
4 1494
set sf = forms!MainForm.Subform.form
If your form name is not a variable It's also faster to refer to the
objects explicitly e.g. forms!Myform as opposed to forms("Myform")
HTH
Pachydermitis

Nov 13 '05 #2
ken
I have to use Forms("string") since the subform declaration is a
string...
Is there anyway I can do what you wrote above "set sf =
forms!MainForm.Subform.form" with useing the forms() function...?

Nov 13 '05 #3
You should read Keri Hardwick's article about referring to subforms and
subform controls etc on access web. www.mvps.org/access - go to
Search, type in "Hardwick" and there should only be a handful of
articles. You can't miss it.

Nov 13 '05 #4
set sf = forms!MainForm.controls("Subform").form
HTH
Pachydermitis

Nov 13 '05 #5

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

Similar topics

1
by: A-PK | last post by:
Hi, How could I set the presence of the form to be called to be locked inside the boundary of the calling form ? I got A and B form A form contain tree view menu and B form was part of the...
1
by: edself | last post by:
I have a form which displays a subform datasheet of information. I'd like to be able to quickly click on a particular record and open up another form showing more detailed information about that...
10
by: headware | last post by:
I know that you can call the method of one from from inside another form by doing something like this Forms("MyForm").MyFunction(12, 34) However, you have to know that MyForm has a function...
4
by: Sandy MacDonald | last post by:
Hi everyone, This is a very simple question, but I am new to VB.net and can't seem to get a simple call to another form to work. example: If (scenerio is true) then load frmLogin end if ...
7
by: Geoff Jones | last post by:
Hi Could somebody give me an example of a way to call another member function of another form from a form that has been called using ShowDialog? Thanks Geoff
4
by: William Oliveri | last post by:
Is there a way to reference a calling form and pass an object to it? This is what I'm trying to do: Form A creates new instance of Form B and then calls it modal. Form B creates a new instance...
0
by: mtennor | last post by:
I have created ten forms and I need to know how to call one form from another form. It seems like this should be easy to do but I can't find a reference to it anywhere. I am working in C# .NET...
0
by: jgrob3 | last post by:
I have a form which contains two subforms: and . The two subforms each have a SQL query to display their results in datasheet view and allow the user to tick which items have been billed. ...
2
by: wassimdaccache | last post by:
Hello Working on access 2007. My database file is made on access2003. I have 2 forms. (categories) and (Productlistsearch). The Productlistsearch form contain a subform called "Products...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...
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...
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
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...

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.