473,804 Members | 3,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Different unbound controls in continuous form view

13 New Member
Is there a way to have unbound, uncalculated controls (or a calculated control that is based on a function) that retains a different value for each record?
Aug 11 '08 #1
24 13104
missinglinq
3,532 Recognized Expert Specialist
No! How could you? How could you expect Access to know what value you've placed in it if it's not stored (bound) to that particular record? All unbound controls hold the latest data that's been entered in any of the instances of the control. In a Continuous View form, you can see this. If it's an unbound control and holds a calculated value and the form is in Single View form, you can cheat and make it appear to hold a different value for each record, by re-calculating it as you move from record to record. But in actuality when the control on RecordA holds 10, all instances of this control hold 10, you just can't see the other instances of the control.

Welcome to Bytes!

Linq ;0)>
Aug 11 '08 #2
NaftoliGug
13 New Member
What a quick response!
I don't understand the question, "how could it be otherwise." It would make sense to remember state across different records. Events are always generated from a specific record, so any code modifying a control's state obviously means to modify that state for that record. And if the user directly modifies the control he certainly means to modify the one he interacted with! Checking a checkbox next to a field should be allowed to trigger code that will perform some operation on that record! No one expects to see all the check boxes nearby to suddenly pop on or off!
Anyway, enough philosophising. Maybe you can help me with my specific problem.
An order is priced based on a number of components, aspects of the order. The price by default is calculated from the inventory tables, but the user should be allowed to override it and enter a custom price for the current order. Since the official price must be stored in either case so that it's possible to revert to the official price at the time of selection, the custom price must exist in separate field, set to null to indicate that it's the regular price that's being used. I'd rather not have an extra field just to store whether or not the price has been customized. That should be determined from whether the custom field is null.
Some of the price components are rows selected from a table, so part of the "invoice" column is a subform, displayed in continuous form view obviously, so you can see all the components of the price at once.
The problem is that the user interface should not require two columns of fields. When the price is customized you should not see the real price, and when it's not you certainly don't need to see the empty text box.
The ideal way would be to have a check box which toggles the control source of a single text box. Apparently that's impossible.
Aug 11 '08 #3
NaftoliGug
13 New Member
Now I tried having text boxes for each and toggling them visible/invisible (real price is visible, double-click sets it invisible and custom visible, afterupdate with null sets custom invisible and real price visible). Guess what? Again, settings apply for every record! Ideas, anyone??
Aug 11 '08 #4
missinglinq
3,532 Recognized Expert Specialist
"I don't understand the question, "how could it be otherwise." It would make sense to remember state across different records."

Of course it does! And you do this by using a bound control!

Any control that you want to be specific to a given record has to be bound to a field in your underlying table! An unbound field is just that, unbound to any record! If you want to tick a checkbox on RecordA, and have it always stay ticked on RecordA, RecordA has to have a field, in the underlying table, that the checkbox is bound to! Data cannot be stored for a record otherwise.

Linq ;0)>
Aug 11 '08 #5
NeoPa
32,579 Recognized Expert Moderator MVP
...
I don't understand the question, "how could it be otherwise." It would make sense to remember state across different records. Events are always generated from a specific record, so any code modifying a control's state obviously means to modify that state for that record. And if the user directly modifies the control he certainly means to modify the one he interacted with! Checking a checkbox next to a field should be allowed to trigger code that will perform some operation on that record! No one expects to see all the check boxes nearby to suddenly pop on or off!
...
The question explicitly stated UNBOUND controls.

Access (and database generally) work depends on attention to detail and logical thinking.

Logically, it could not make sense otherwise for unbound controls. If this isn't clear to you then you will struggle with databases.
Aug 11 '08 #6
NaftoliGug
13 New Member
I didn't say I wanted to persist the state! I think I understand databases quite well, thank you. There's no reason that Access can't remember transient state that would help to provide some functionality. Anyone who has programmed databases with a real programming language can understand that! Forms are more than table views with a different shape!
In other words, often it's necessary to remember something about a record temporarily, in order to affect the record in a more complex way than a directly editing a bound control would allow for.
Perhaps a simpler example of this concept would be a button that needs to have a different caption for different records, or controls that have to be hidden for particular records. A table might hold records of the same general category but that differ in various ways, and the form needs to provide a modified interface for some records.
Anyway, enough philosophizing. I need some practical ideas to accomplish my goal. It is extremely inelegant to have to store three columns (fields) when the same thing could be accomplished with two.
Aug 11 '08 #7
missinglinq
3,532 Recognized Expert Specialist
Since you obviously have all the answers, good luck to you!
Aug 11 '08 #8
MMcCarthy
14,534 Recognized Expert Moderator MVP
I didn't say I wanted to persist the state! I think I understand databases quite well, thank you.
This is not a database issue. These controls are unbound which means the data is not being stored in the database. Your question is about how Access handles unbound (unstored) values not about databases.

There's no reason that Access can't remember transient state that would help to provide some functionality. Anyone who has programmed databases with a real programming language can understand that! Forms are more than table views with a different shape!
Your understanding of transient state seems faulty. The data in unbound controls are not stored anywhere therefore the forms in question are not representing a table view. An unbound control on a form while it is displayed in each instance of the form in continuous form view only exists once. Therefore, any data entered in an unbound control is shown wherever that control is visible. That is, in each instance of the continuous form.

In other words, often it's necessary to remember something about a record temporarily, in order to affect the record in a more complex way than a directly editing a bound control would allow for.
My understanding of the point you are making here is that you are speaking of what are known as calculated values. These are not stored as a matter good practice in RDBMS for the aforementioned reason.

Perhaps a simpler example of this concept would be a button that needs to have a different caption for different records, or controls that have to be hidden for particular records.
The second point you are making is addressed using conditional formating. The first point regarding label captions cannot be done in the way you are addressing it on continuous forms.

A table might hold records of the same general category but that differ in various ways, and the form needs to provide a modified interface for some records.
This sounds like you have a problem with the structure of your data. A table that holds records of the same general category but differ in various ways require at the very least a look up table.

Anyway, enough philosophizing. I need some practical ideas to accomplish my goal. It is extremely inelegant to have to store three columns (fields) when the same thing could be accomplished with two.
I reiterate that I believe your issue is with the structuring of your data. If you explain the data you are trying to store and what its relationship is with the other data in your table we may be able to help. However, from what I have read you are trying to use unbound controls in a manner for which they were not intended.
Aug 11 '08 #9
NeoPa
32,579 Recognized Expert Moderator MVP
Or to put it more simply, there seems little evidence of of the understanding you claimed in response to the help you were offered.

From what you've posted, it's clear to me why you're struggling with your current task. There are a number of fundamental ideas that one needs to grasp in order to work effectively within an RDBMS.

Please understand I don't say this to be insulting, but as you've made a claim to understanding these issues I wanted to make sure that anyone reading this thread knows not to take what you say as established fact. We have a number of members who are just starting to learn about these issues. They can make their own minds up of course, but I felt it necessary to make that clear for them.

I think they will be able to make their own minds up as to the wisdom of the attitude you've taken towards people offering their time for free in order to help those who are asking for help. That includes you in case you've forgotten.
Aug 11 '08 #10

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

Similar topics

3
15855
by: Prakash Wadhwani | last post by:
Is there any EASY way to highlight a full row in a continuous form so that as i navigate up & down the table/continuous form using the arrow keys, the entire line (all fields) get highlighted ? This will give the effect of a bar moving up & down. BTW, all fields are locked so this form is View-Only & not editable. Thx & Best Rgds, Prakash.
4
3178
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
10
3427
by: DFS | last post by:
I'm sure this has been discussed before, but I'm too tired to hunt for it. I have a survey table containing questions with different answer scales. Some are 1 to 5, others are A,B,C, etc. I show these answer scales in a listbox. When the scale type changes, the list items should change. Problem is, the bound continuous form shows for all questions only the scale for the first question - unless I click on a question with a different...
5
3841
by: Susan Bricker | last post by:
Hi. I have a friend who has a form (ok that's a lie ... it's me that has the form) that is opened up with AllowAdditions and AllowEdits = TRUE and the selection criteria for the form results in 2 records in the "recordset". The form displays one record at a time and has a navigation control at the bottom. The number of records message says "1 of 2". Tracing the logic shows that in Form_Open, Form_Load, and Form_Current the Cycle...
1
2979
by: chfran | last post by:
I have a form (continuous) that show me data from a table (not a query). I can only modify and move between the data of the first record. I cannot move to the 2nd, 3rd, or 85th record, only the first. I don't know if I've turned on something unintentionally or what. Any insights? chfran
3
2760
by: google | last post by:
I'm developing an application for use within my company in Access 2003. I'm new to '03, the application I did for my former employer was in '97. The two applications have similar functionality (we're sales offices, and I'm doing things such as associate directories, commission calculations, order tracking, etc.). 2003 seems to have a few extra features, but I seem to continually run in to oddities that seem like they SHOULD work, but...
1
5929
by: Catriona | last post by:
I am developing an Access application where users insert bill records for an electricity account by clicking on a new button. The required workflow is 1) New button clicked 2) New record appears with some field populated per defaults for account and some based on previous records - eg dates 3) Save button clicked 4) Record validated and saved if it passes validation. I have three issues as follows
2
5662
by: arnold | last post by:
Hi Friends, I wonder if any body has the solution for the following problem: My form view is datasheet view and I have unbound text box which is not related to any field but I need it in my form for some purpose. My form might consist of many rows or records. My problem is that when I put specific text in my unbound text box the same text is repeated in all other rows. Hence is there a way which allows me to enter a value in my text box...
4
2878
by: RLN | last post by:
re: Access 2003 I have a field called SentByMethod the displays a 'zero', '1' or '2'. I am trying to set up a text field that shows "Sent by X" if it's 0, "Sent by Y" if it's 1, and "Sent by Z" if it's 2. I can get this to work in single form mode (fields on the form) How do I get this same thing to work when the form is in "continuous form" view mode? (when row 1 has a SentByMethod of 0, row 2 has "SentByMethod of 1....etc The...
0
9706
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
10571
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
10326
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
10317
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
7615
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
6851
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
5520
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...
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
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.