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

Calling one form from another

489 256MB
Here's my question. I have a form where user can select how they want to edit a customer, by cust naumber, last name there are about 5 different selections. After the user selects the option say the customer number I want to open another form using that customer number as the where clause.
I use the following code to open the form
Expand|Select|Wrap|Line Numbers
  1. docmd.openform "EditCust",,stdLink
where the stdlink = custNumber = " & VCustNumber & " When the form comes up it's blank. The forms record source is the customer table. When I look at the forms data it shows the filter as customernumber = the number specified in the stdlink. Any ideas why this is happening.

Thanks
Sep 18 '14 #1

✓ answered by NeoPa

I would expect the value of stdLink needs to be :
Expand|Select|Wrap|Line Numbers
  1. custNumber = 'XXXXXXX'
where XXXXXXX is the actual customer number.

Example Filtering on a Form will give you some tips on this. I would certainly not recommend switching to the use of OpenArgs in this case. It is not more appropriate and is simply an attempt to avoid dealing with a little confusion. That leaves you stuck the next time you want to filter a form properly.

4 1143
twinnyfo
3,653 Expert Mod 2GB
CD Tom,

It's difficult to know for sure what your stdlink is supposed to be. If your post is accurate, it should reflect:

Expand|Select|Wrap|Line Numbers
  1. stdlink = "custNumber = " & VCustNumber
But, I'm not sure I'm covering all the possibilities here, as the code on your first form is not provided.
Sep 18 '14 #2
zmbd
5,501 Expert Mod 4TB
If TwinnyFo's reply didn't help, then it would be helpfull to see all of the VBA that feeds the line you posted.
Sep 18 '14 #3
CD Tom
489 256MB
I figured it out I'm going to use the openArgs to send to the other form. Thanks
Sep 18 '14 #4
NeoPa
32,556 Expert Mod 16PB
I would expect the value of stdLink needs to be :
Expand|Select|Wrap|Line Numbers
  1. custNumber = 'XXXXXXX'
where XXXXXXX is the actual customer number.

Example Filtering on a Form will give you some tips on this. I would certainly not recommend switching to the use of OpenArgs in this case. It is not more appropriate and is simply an attempt to avoid dealing with a little confusion. That leaves you stuck the next time you want to filter a form properly.
Sep 21 '14 #5

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

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...
3
by: Sherwood | last post by:
Greetings, I have the following code (which displays a second form), but it is not working as expected. I want to close the calling form after the dismissing the second form. However, the...
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...
6
by: Gary Miller | last post by:
Does anyone know how to detect a modeless form on closing by the form that invoked the modeless form? form.Show();
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...
1
by: Rich | last post by:
Hello, Is there a form property that can be set for positioning a form with respect to the parent? I could have sworn I saw such a property like Center window, or Parent something... But I...
2
by: Bjorn Sagbakken | last post by:
With ASP.NET 2.0 I want to add a nice and sleek feature to my application where the user typical clicks a button to open a smaller window to enable a search, lets say for customers or products...
3
by: Darin | last post by:
I have a program that (for example), has form A that opens form B that opens form C, and form C calls a function, and that function calls a sub. From that last sub, i need to know if came...
2
by: lenniekuah | last post by:
Hullo Good Friends, I need your help. Please Help me. I am trying to pass the name of the Calling FORM FRMSALES to the Loaded FORM FRMPOPUPCustomers so that FRMPOPUPCustomer will set the FRMSALES...
2
by: maher habaj | last post by:
I have a form containing a command button which calls another form and I want to put in the last opened form a value taken from the calling form
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
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
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
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.