473,804 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form based editing ?

Hello,

What is the best way to implement a form based editing?
The user would select first from a list control (highlighted selection) ?
e.g. through a listbox or datagrid. Then, select from buttons: [New],
[Edit], [Delete]. When editButton is clicked, a form will be displayed for
editing.
How would I populate the form edit window? By setting each field. e.g.
fieldA.text = "value", fieldB.text, etc. Or is there something like DataGrid
control displayed as form ?
Thanks for any help.
Nov 17 '05 #1
1 1598
If I understand you correctly, you want to build a classic maintenance
form, where the user can edit the individual fields of the selected
item.

If this is so, then in answer to your question, no there is (currently)
no way to auto-populate the individual controls that hold the value of
each field. You have to populate them one by one, as you pointed out.

That said, you should encapsulate this process by having the form
and/or panel that contains the individual controls export a property
for the business object being edited / created.

Setting the property stores the business object in the form / panel and
copies the properties of the business object into the individual
controls.

Getting the property builds a new business object from the contents of
the individual controls.

That way, callers to your form can just create a new form and say
something like:

form1.Customer = ...

and all of the fields will be set up. SImilarly, when the user clicks
"OK", the caller can say:

Customer changedCustomer = form1.Customer;

to get the changes.

Nov 17 '05 #2

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

Similar topics

3
11109
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I have a primary form named TestResults, which is connected to data in a table named TestResults. There are basically two other tables that are related to the TestResults table (and the primary form) named Names-Normalized and SiteAddresses. The...
5
1657
by: MLH | last post by:
I have a form based on a table that is opened this way... DoCmd.OpenForm "frmAdminSetupInfo", , , , A_EDIT It was my intention that the form allow the user to edit table data - not add records. The table contains a single record only. I don't want more records be added to the table. When frmAdminSetupInfo opens, all one has to do to go to a newrec (empty new record) is press PGDN or hold down
0
1413
by: Mike | last post by:
I have a form that has a search button on it. The form has three text boxes, last name, first name, and bidder number. I put in a last name and click the search button. Clicking the search button opens another form based on a SQL view. What is supposed to happen is the search results form opens based on the information entered in one of the controls (Last Name, First Name, Bidder #) Here is the code:
13
1687
by: david | last post by:
I can not figure out what is the problem that I can protect ASP.NEt form resource but not some other type of files, for example, images. All my aspx forms located in Demo folder and image files located in a subfolder of Demo, named images. I implement Role based form authentication. When I access all aps forms, it works fine and ask me user/password. However, I can use IE browser to directly access any image file in subfolder images. My...
2
1755
by: dbuchanan | last post by:
Hello, I want to open a child form based on the record selected in a dataGridView of the parent form. I want the child form to open with a populated child table based on the selected parent record. How do I get the ID of the selected record in the parent form's dataGridView so I can use it in filling the child form's dataGridView?
4
2367
by: Deus402 | last post by:
Here is my table design: tblEmployers EmployerID autonum (primary key) EmployerName text tblLocations LocationID autonum (primary key) EmployerID longint (foreign key) LocationAdress text
1
2335
by: Kevin | last post by:
The menu form has two options, one to create a new estimate, the second to open an existing estimate. Under option two is a list box containing all of the estimates. There are several different estimate categories however. The siginificance is, all of the estimates are in the same table, but there are different forms for viewing and editing each type. Each estimate record has a field for EstimateType. The user selects an estimate from...
2
2307
by: Sanjaylml | last post by:
I have made a form in Access 2000. In addition to just simply enter the data through form, I have appended sub-form in main form to show the all the entered records as Sub-Form (DataSheet), which is perfectly working. My problem is that now I want to show the sub-form based on my selection in Combo box field. Is it Possible to show the sub-form based on selection & if so, with Serial Number / Line Number of selected values in Sub-form...
15
4427
by: jt196 | last post by:
I'm trying to create an editable form of fulfilled orders on my system and am running into problems with creating a form based on this query. The field that I need to update (invoice number) is read-only. I DO understand the reasons for this: The query takes information from an orders table and a transactions table which have a one to many relationship. I don't want to use any of the transaction fields, but I do need to use a query based on...
0
9594
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10600
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10350
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 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...
0
10096
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 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...
0
9174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4311
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
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3002
bsmnconsultancy
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...

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.