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

Form to form communication problem in VB

Hi..Am doing Retailer software using VB 6.0 with ms-access..

Actually i have many form(sales entry form,purchase entry form ,stock form, etc..) in my project which all are in MDI except Log in form.

my problem is,,, when am loging in using my user id through log in form,then MDI form will b getting loaded..

my Doubt is......

now each form should have the userid which was currently logged in.. i have to use this id in all of my form where ever i want...Plz let me know the solution..

Thanks&Regards,
Bremanand.S
Jul 20 '06 #1
4 2272
sashi
1,754 Expert 1GB
Hi there,

set the mdichild to false in your login form.. now your login form will load without loading your mdi form..

in order to use login id on all your forms.. declare a public variable and store the login id to that variable..

declare the variable in a module file.. see below..

Expand|Select|Wrap|Line Numbers
  1.   Public strLoginID as string
  2.  
Jul 20 '06 #2
Hi....
The method u have given is exactly matches with my requirement..

Thanks a lot.
Regards,
Brem
Jul 21 '06 #3
Hi there,

set the mdichild to false in your login form.. now your login form will load without loading your mdi form..

in order to use login id on all your forms.. declare a public variable and store the login id to that variable..

declare the variable in a module file.. see below..

Expand|Select|Wrap|Line Numbers
  1.   Public strLoginID as string
  2.  
Hello Sashi

I have a very similar problem, but i am using VB.Net and not VB6 as our friend here.
Now, Where should I declare the Public variable? in the MDIParent form? and how should I take its value from the child forms?
I am logging in with the MdiParent as the start up form, so the login form is showing on the parent's load event.

thanks
Sep 30 '07 #4
QVeen72
1,445 Expert 1GB
Hello Sashi

I have a very similar problem, but i am using VB.Net and not VB6 as our friend here.
Now, Where should I declare the Public variable? in the MDIParent form? and how should I take its value from the child forms?
I am logging in with the MdiParent as the start up form, so the login form is showing on the parent's load event.

thanks
Hi,

Add a .bas module to ur project and declare there..

Public MyLoginName As String.

And Populate that variable after Login, access it anywhere in the project..

REgards
Veena
Sep 30 '07 #5

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

Similar topics

1
by: | last post by:
Is there anyway to update a control held on my main form from a child form? I've tried making the control itself public but I still can't seem to access it
2
by: jcridgeway | last post by:
I cannot get my parent form to reflect the changes in the child subform. To illustrate, use the Northwind database and type the following code in the OnCurrent event of the Orders form. If .! >...
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"? ...
2
by: Dmitri Shvetsov | last post by:
Hi, Can somebody give a quick advice? I call a new form from a main form, like: CNewForm nf = new CNewForm(); where I should insert a string into a TextBox.Text field. Then I should...
3
by: Brian Basquille | last post by:
Hey there all, Fairly easy question for a C# expert, i assume! Am still working on my Photo Album. On frmBrowsePhotos, i have a listBox (photosList) containing photoID's from a table in an...
0
by: bob | last post by:
Hi all Currently porting an application to managed C++ Have managed to create working MDI form and child windows etc. Also added a callback from an unmanaged 'C' dll (ok that was strangely...
4
by: Robin Tucker | last post by:
Some thread confusion to lighten up your day: I have a worker thread and a main form. When the user clicks the Close icon in the top right of the form, my program tells the thread to "stop". ...
2
by: harvie wang | last post by:
Hi, I want to implement a common Form with special interface, such as MovePoint(double,double). I create a interface first: namespace ABC.Test { public Interface IMyWindowInterface { void...
6
by: Greg Strong | last post by:
Hello All, Is is possible to use an ADO recordset to populate an unbound continuous Subform? I've done some Googling without much luck, so this maybe impossible, but let me try to explain...
2
by: geowhe | last post by:
I am writing a VB6 application that opens with a Login form that allows the user to select one of several databases. Clicking 'OK' on the Login form opens the Main form. Something has happened...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.