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

How call form from another form ?

Hi friends
I have "login" form. My submit button checks username and password.I want this button also close "login" form and open another form which name comes from label caption. For example:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm " label11.caption "
But I get error. and cannot solve this.
Please help
Thanks in advance
Apr 3 '17 #1

✓ answered by NeoPa

You should understand that the quotes (") tell the compiler to treat the text within them as literal text, rather than what you want, which is to treat that text as a reference to where to find the string you actually want to use.

Lose the quotes and you should find it works. Assuming all else is set correctly of course.

1 970
NeoPa
32,556 Expert Mod 16PB
You should understand that the quotes (") tell the compiler to treat the text within them as literal text, rather than what you want, which is to treat that text as a reference to where to find the string you actually want to use.

Lose the quotes and you should find it works. Assuming all else is set correctly of course.
Apr 4 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: genetic.error | last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up before... The VS.Net MSDN file seems to state that the following should work: Form1.Show Form1.Visible = True Form1.Hide...
1
by: David | last post by:
Hi, I have a form which requires Serial Numbers to be loaded from another form. When I press a button, another form opens with a list of Serial Numbers. I have the record selectors enabled. ...
3
by: fh1996 | last post by:
Form.Owner and Form.Parent, what's the difference between them? Form.ShowDialog() and Form.Show(), when to use which? Form.Activated(), what does it mean when saying a Form is "activated"? ...
12
by: Bill Todd | last post by:
Form B needs to call a public method of Form A. How can form B get a reference to the instance of Form A using its name or any other method? Is there a collection of form instances that can be...
2
by: Dean Slindee | last post by:
I have two different independent forms that need to talk to one another to syncronize their displays. Is there a shorter way of referring to another form's controls/events than creating a class...
5
by: Mrozu | last post by:
Hi I have frm1. On this form button.Click code for this button is: Dim frm2 as New frm2 frm2.show So after click, frm2 form is shown.
13
by: DDragon | last post by:
ok here is the problem, i have to forms which have values i wish to be added together i can add together the values in one form all right but im having problems with adding the values of the other...
1
by: =?Utf-8?B?U2FpbXZw?= | last post by:
Hello Marc Gravell and Machin. Good Day. Why your not using an Instance in the form and yet your using a New Form? Im using it because I want to open a single form only. If Im using a New...
3
by: steveninfl | last post by:
Hello , I am using MS Access 2000. I have a Table called Transactions, I have created a form for this table, one of the fields on the form is a combo box with the row source type as value list. In...
0
by: cheekangteh | last post by:
currently i am doing sms function by using window mobile standard 6. i have multiple form, up to 4 window form. and at the last form, i wish to collect all the data that already key in in previous...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.