I have a form that is locked for editing, adding or deleting. Through the use of a command button I open another form, that allows editing, plus allows the user to other areas of the database, through command buttons.
When I click the command button I want to open the second form displaying the CompanyName and information from the first form (the record I had displayed on first form, but open for editing.
On the second form I have a command button that when clicked allows the user to edit the insurance date information of the Company. I would like this form to display the CompanyName from the original form, plus the insurance date.
Right now as I open each form, I have to do a find to get to the record I had displayed on my original form.
So far I am not sure how to go about this so have no code...Any suggestions
4 2268 jeffstl 432
Recognized Expert Contributor
I have a form that is locked for editing, adding or deleting. Through the use of a command button I open another form, that allows editing, plus allows the user to other areas of the database, through command buttons.
When I click the command button I want to open the second form displaying the CompanyName and information from the first form (the record I had displayed on first form, but open for editing.
On the second form I have a command button that when clicked allows the user to edit the insurance date information of the Company. I would like this form to display the CompanyName from the original form, plus the insurance date.
Right now as I open each form, I have to do a find to get to the record I had displayed on my original form.
So far I am not sure how to go about this so have no code...Any suggestions
txtSecondFormSe arch.text = FirstFormName!t xtCompanyName.T ext
I have no idea if this is what your looking for but this is how you can get values from controls on a different form then the one your working with.
Otherwise you can also use functions to pass your values like parameters from one function to the next. This will work if your functions are declared globally and in a Module as well as the variables you are using. Otherwise the above should work.
txtSecondFormSe arch.text = FirstFormName!t xtCompanyName.T ext
I have no idea if this is what your looking for but this is how you can get values from controls on a different form then the one your working with.
Otherwise you can also use functions to pass your values like parameters from one function to the next. This will work if your functions are declared globally and in a Module as well as the variables you are using. Otherwise the above should work.
Well, this gives me a direction.
DoCmd.OpenForm "frmEditCompany List", acNormal, , , acFormEdit, acWindowNormal
txtfrmEditCompa nyListSearch.Te xt = frmCompanyList! txtCompanyName. Text
DoCmd.Close acForm, "frmCompanyList ", acSaveYes
But I don't have it right yet. I appreciate your help.
jeffstl 432
Recognized Expert Contributor
Well, this gives me a direction.
DoCmd.OpenForm "frmEditCompany List", acNormal, , , acFormEdit, acWindowNormal
txtfrmEditCompa nyListSearch.Te xt = frmCompanyList! txtCompanyName. Text
DoCmd.Close acForm, "frmCompanyList ", acSaveYes
But I don't have it right yet. I appreciate your help.
OK
Is this access? If you are working with VBA in access you might get a better way to do this on the access forums. Also I'm not 100% sure but I thought there was a form wizard that lets you build out a function exactly as you are describing (opening a form on a record based on a value from the current form).
Anyway just wanted to point out too that I think this:
txtfrmEditCompa nyListSearch.Te xt = frmCompanyList! txtCompanyName. Text
Should be in you Form_Load event on the frmEditCompanyL istSearch Form probably.
OK
Is this access? If you are working with VBA in access you might get a better way to do this on the access forums. Also I'm not 100% sure but I thought there was a form wizard that lets you build out a function exactly as you are describing (opening a form on a record based on a value from the current form).
Anyway just wanted to point out too that I think this:
txtfrmEditCompa nyListSearch.Te xt = frmCompanyList! txtCompanyName. Text
Should be in you Form_Load event on the frmEditCompanyL istSearch Form probably.
Thanks, I have it figured. And thought I was in a VBA forum, guess I was not paying attention.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Steve Jorgensen |
last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of
multiple parameters in a Property Let procedure to pass dimensional
arguments on the basis that, although it works, it's not obvious how the
code works if you don't know the intricacies of the Property Let/Get
syntax. Likewise, I dislike (and code to minimize the use of) the VB/VBA
syntax of returning a value by referring to the function name as if it were
a...
|
by: Tony Williams |
last post by:
Sorry to repost but I cannot work this out. Can anyone come up with a
suggestion?
I have a main form based on Table1. The form has a tab control of three
pages. Each page has a subform based on a different table ie subform1 based
on Table2, subform2 based on Table3 and subform3 based on Table4. I want the
user to be able to use the Filter By Form facility in Access but this does
not work when trying to select controls on the main form AND...
|
by: Abhi |
last post by:
FYI:
This message is for the benefit of MS Access Community. I found that
this prblem has been encounterd by many but there is hardly any place
where a complete solution is posted. So I thought I should give back
to the community by posting our findings.
Thanks you all for all your help till now by posting problems and
their solutions.
~Abhijit
|
by: Kathy |
last post by:
What is the standard technique for handling the fields in the following
scenario on a continuous form?
Multiple Divisions. Each Division has multiple Buildings. Each Building has
a Supervisor.
Tables: (abbreviated)
TblDivision
DivisionID
|
by: piscogirl |
last post by:
Hi all,
Here's my case:
I have a form: Event Form
and a subform: AttendanceSubForm
The user selects a name (from a Person Table) on the subform to
register for the event. If the name is not there, they are to click a
| |
by: mtgrizzly52 |
last post by:
Hi all,
I've looked for an answer for this in lots of books, online in several discussion groups and have not found the answer which I feel may be very simple.
What I want to do is have a switchboard with several active buttons on it for entering new data, updating data, reports etc. The new data and report stuff is easy, but the update button has me baffled.
What I want to have happen is when the update button is clicked, a parameter...
|
by: Markus_989 |
last post by:
I have a LOANS table that has a list of loan details for different
borrowers. I have a main switchboard with a LOANSELECT combo box
(that displays a list of borrower last names and loan numbers). I'd
like to be able to have a user click on the say, RECEIVE PAYMENT
button that will open the payments form. This form should open to the
loan that was selected from the LOANSELECT box. This form also has a
box on it to switch to different...
|
by: BD |
last post by:
I am coding with C# in Visual Studio 2005 for a database application
residing on remote MS SQL Server 2005. What I want to do is open the
same form but from 2 different places and only one instance. I
currently have the form where it will open from a double click on
datagridview from another form to the proper record and only one
instance. However, doing this bypassed by databinding source for
opening the form to all records. I still...
|
by: DavidB |
last post by:
I want to be able to go to a specific record on my form when I open
it. The record I want to go to will be dynamic based on the value
currently stored in a global variable. The global contains the
primary key (long int - BlahBlahID) and there is a field on the form
(tbBlahBlahID) that contains the value for this field. I am having a
major case of DFUism here because this looks to be a simple request,
but my aged brain is stumbling on...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |