473,395 Members | 1,694 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,395 software developers and data experts.

Are hidden fields in forms a bad coding practice?

Hello,

I've been creating some forms recently in Access 2003 and using hidden textboxes quite a bit. As an example, the visible textbox CasesDone uses the DLookup function to sum the records in table Cases.

The hidden textbox in the form (HiddenCasesDone) is bound to the Week_Data table and I set the value of that textbox with a form event.

Is there a better way to do this? I seem to recall when taking my VB classes (way too long ago) that I should avoid using too many hidden fields... though I could be wrong.

minchazo
Apr 24 '08 #1
4 3490
FishVal
2,653 Expert 2GB
Hi, minchazo.

In most cases saving calculated data to table is considered to be a bad programming practice. Not sure as for hidden controls.

Regards,
Fish
Apr 24 '08 #2
NeoPa
32,556 Expert Mod 16PB
As fish says, there's nothing fundamentally wrong with using hidden fields on your forms. I'm afraid that this doesn't necessarily mean your code is efficient or well thought out.

You haven't explained your situation fully enough to say for sure, but some of the comments do ring warning bells in line with what Fish has already said (about saving calculated data).
Apr 25 '08 #3
In most cases saving calculated data to table is considered to be a bad programming practice.

Yup, that would be me. I need to design reports/forms to calculate and display the values instead of trying to record it in a table, correct?

And I need to go review my old database design textbooks...
Apr 30 '08 #4
NeoPa
32,556 Expert Mod 16PB
Typically, the queries do all that sort of rubbish for you rather than the forms / reports or even updating the tables.

There is a facility within the form / report object to handle calculations where necessary, but this is generally easier to handle in the queries.
Apr 30 '08 #5

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

Similar topics

4
by: Ryann | last post by:
Hello. I am creating a form that has 5 steps/pages. Each page contains about 20 fields. But I don't want to write them until they submit on the last page. I figured out that I can use hidden...
13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
1
by: uNConVeNtiOnAL | last post by:
I am trying to do validation on a hidden field, but it doesn't seem to be working - all the other non-hidden fields do Is this indeed not possible? I am using a JSP tag for the hidden field ...
1
by: Sam Wuebben | last post by:
I would like to add a few hidden field values to a form as it is submited via JavaScript. I have a static page shopping site that uses MIVA shopping cart. Some of the pages are getting quite...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
5
by: Roshawn Dawson | last post by:
Hi, Are hidden fields passed in the querystring when a form is posted back? If they are, must the hidden fields be server controls in order to access them from .net code? Thanks, Roshawn
3
by: Microsoft_Public | last post by:
All I'm getting is <null>...... I have a legacy input form that I must maintain for a few more months until the balance of the site can be converted to .Net. I need the one database field to...
18
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having...
6
by: Graham | last post by:
I have long thought there is something missing with HTML forms, in that there should be a provision for a form with hidden input fields, with the whole form being hidden, in particular with no...
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: 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...
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
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
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...

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.