473,779 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Storing Values in database using Forms

14 New Member
Hello guys again! Back with invoice problems. Just want to know how to store data in the main database in different tables and fields using a form. I have a datasheet view of a form where i have to show ;

Expand|Select|Wrap|Line Numbers
  1. invoice number                      (INPUT) 
  2. price                                     (INPUT)
  3. No. of units                            (INPUT),
  4. Weekly Total          (calculated by =[no_of_units]*[price]) 
  5. start date                               (INPUT)
  6. end date                                (INPUT) 
  7. days                      (=[end_date]-[start_date]+1)
  8. total amount           =(([Weekly_total]*[days])/7)
Now, All this is working but not storing the values. If that works i will be jumping for a whole week :P Please help me jump. What should i do to store these values in specific fields..:)
Takecare
thanks in advance

mj
Jul 31 '07 #1
10 3627
missinglinq
3,532 Recognized Expert Specialist
You have inadvertently posted your question in the Articles section rather than in the Forum section of our site, so I have moved it across for you.

Linq ;0)>
Jul 31 '07 #2
mlcampeau
296 Recognized Expert Contributor
Hello guys again! Back with invoice problems. Just want to know how to store data in the main database in different tables and fields using a form. I have a datasheet view of a form where i have to show ;

Expand|Select|Wrap|Line Numbers
  1. invoice number                      (INPUT) 
  2. price                                     (INPUT)
  3. No. of units                            (INPUT),
  4. Weekly Total          (calculated by =[no_of_units]*[price]) 
  5. start date                               (INPUT)
  6. end date                                (INPUT) 
  7. days                      (=[end_date]-[start_date]+1)
  8. total amount           =(([Weekly_total]*[days])/7)
Now, All this is working but not storing the values. If that works i will be jumping for a whole week :P Please help me jump. What should i do to store these values in specific fields..:)
Takecare
thanks in advance

mj
What are/is your table structure(s) that house the above fields? Are you currently using a query for your form?
Jul 31 '07 #3
NeoPa
32,577 Recognized Expert Moderator MVP
Drago,
Remember the data is all stored in tables not on forms. Forms are like windows that allow you to see some of the data. They only hold data transiently (while they're open) and even that is logically just a view of the underlying data (tables or queries).
Jul 31 '07 #4
missinglinq
3,532 Recognized Expert Specialist
All this is working but not storing the values.
Exactly how is it working then if it's not storing your data?
Jul 31 '07 #5
drago
14 New Member
Exactly how is it working then if it's not storing your data?
Hi again, thanks for moving this question to forum section :). Sorry about that as iam still learning the forum life style which is very helpful.

I have created an invoice table with attributes invoiceID(invoi ce number), item_price (price), no_of_units(Num ber of units), Weekly_Total, start_date, end_date, Days, Monthly_Total(t otal amount)
Code: ( text )
invoice number (INPUT)
price (INPUT)
No. of units (INPUT),
Weekly Total (=[no_of_units]*[price])
start date (INPUT)
end date (INPUT)
days (=[end_date]-[start_date]+1)
total amount =(([Weekly_total]*[days])/7)
I have to input data in the database table manually, except the fields where calculation is required (which is also not saving the values after calculation. Is it possible to do so?). On the form these values are displaying. I want to input these values in the database table using form or anything else. Iam not using any queries at the moment for this.

With regards

mj
Aug 1 '07 #6
NeoPa
32,577 Recognized Expert Moderator MVP
Drago, storing calculated values is really NOT a good idea. If you're interested why, check out Normalisation and Table structures.
I'm confused as to how you think it might be appropriate to store total values (presumably across many invoices) in a table designed to handle invoices (individuals).
Your last post seems to say that you are editing the data directly in the table, but then goes on to refer to a form you are using. I'm confused as to what is actually hapening. The form would make more sense certainly.
Aug 1 '07 #7
drago
14 New Member
Drago, storing calculated values is really NOT a good idea. If you're interested why, check out Normalisation and Table structures.
I'm confused as to how you think it might be appropriate to store total values (presumably across many invoices) in a table designed to handle invoices (individuals).
Your last post seems to say that you are editing the data directly in the table, but then goes on to refer to a form you are using. I'm confused as to what is actually hapening. The form would make more sense certainly.
Thanks for your reply. Amm... so form are used just to view records. Thats fine. Suppose if I want to store values (not edit) in database using an interface. What should i do then. For example what i mean is if u enter name, dob, address in 3 different text fields it goes in to the database and create a new record.
I hope this will help u.
Aug 1 '07 #8
NeoPa
32,577 Recognized Expert Moderator MVP
Forms can certainly be used as an "interface" for adding, editing and also deleting records in a table. The data is still "stored" in the table but it is displayed on the form.
The database, is an object which contains all the code, forms queries AND tables (etc etc).
Aug 1 '07 #9
drago
14 New Member
Forms can certainly be used as an "interface" for adding, editing and also deleting records in a table. The data is still "stored" in the table but it is displayed on the form.
The database, is an object which contains all the code, forms queries AND tables (etc etc).
great...so now for example if iam calculating values on the form taking some values from database like

attribute A= 90 - want to save in the database
attribute B=30 - want to save in the database
attribute Total= A-B = 60 - this calculated value i want to save in the table

please dont be mad at me as iam trying my best... iam new to this...
Aug 1 '07 #10

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

Similar topics

2
2433
by: Venus | last post by:
Hi all, Newbie here!! I have 4 forms(A,B,C,D) and a thank you page for my questionnaire. People will be redirected to B or C depending on the last question's answer. B or C will redirect to D after B or C is finished. D then goes to the thank you page. I want to get all the answers from A,B/C,D first and then insert all
4
4282
by: Heather | last post by:
Hi I am desparately looking for advice in relation to storing the results after selecting items from two combo boxes on a Referral form. The first combo box 'ctl Type' displays a full list of Agency Types, then the 2nd combo box displays a list of Organisations, depending upon the Agency Type Selected. The first combo box 'ctlType' (Unbound), Row Source: to field in 'AgencyReferralType'.
4
9904
by: Hazzard | last post by:
What is the best way to do this? Binary with 0 representing off and 1 on? Int16 with 1 representing first button, 2 the second, 3 ... varchar with a character values at certain positions in the string representing radio button values. Thanks, -hazz
9
2064
by: Brad | last post by:
I have written some code to manipulate data/records in a MASTER (order header) and DETAIL (order details) tables. What I have written is too extensive to post but essentially trying to: 1. Assign to a datarow (dr1) the first record of the MASTER table 2. Assign to another datarow (dr2) the second record of the MASTER table 3. If dr1.field1 = dr2.field1, then proceed, otherwise do stop 4. Assign to a third datarow (dr3) the first record...
14
1812
by: John Welch | last post by:
Hi all. I'm creating a FE/BE database that will be used by about 6 users. As usual, I have several fields, such as "OrganizationTypeID" that will get values (via combo boxes in forms) from separate lookup tables. I know the 'correct' way to do this, using a long integer as the field type. In this case, however, I am considering doing it "incorrectly", by actually storing the text in my field rather than an ID, still using a lookup table,...
2
2285
by: Frankie | last post by:
Using SQL Server 2005 and .NET 2.0; I'm creating a Windows Forms application that will need to display photos of people, along with a bunch of information about each person. In a Web application, there is a generally accepted "best practice" of storing only a string (the path to the .jpg file name), with the actual file stored in an NTFS folder (and not in the database). What's the standard practice for Windows Forms applications? Is...
7
1885
by: Mike | last post by:
I have developed an application, for psyc patients.... they type in very personal information in a web form to help them work through problems in their lives. Once they enter the info, I encrypt the data and store it in a MySQL database. Users can then print, edit, delete or share the information they entered with their therapist. I'm not happy storing this in the database for two reasons: (1) my host places restrictions on my database...
10
3247
by: madereal | last post by:
Situation: I have a database that has users with different levels of access to the information they are allowed to view. I have addressed this issue by creating a login form that opens on startup. Behind this form is the tblUserDetails, which has login information such as: userID, password and access level (which has three levels: basic/full/admin). Problem: Once the user has logged in I would like to be able to retrieve their userID and...
2
2007
by: Mythran | last post by:
We followed an example found on MSDN to create an encrypted FormsAuthenticationTicket and storing the ticket in a cookie. Is this the "correct" way to store the authentication ticket? We are attempting to create a web service from the web application and our goal is to have the user login to the web application and then, using the same credentials and/or authentication objects, access the web services to retrieve our data from other...
0
9636
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, 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...
0
9474
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
10306
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
10139
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...
1
10075
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7485
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 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...
0
6727
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();...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
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 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.