473,782 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

forms based on queries - change values?

54 New Member
Hi

I have a form (Allocation_Sub _Form) which is based upon a query. This query draws information from a number of tables depending on what invigilators are invigilating particular exams. This form is then used as a subform on another form (Allocation_For m). One of the fields that is retrieved from the query is a check box however when the form is open it is not possible to change the value in this check box. Is there a way that a user can check/uncheck this box? Originally there had just been a button that opened a seperate form however this showed every person rather than just the invigilators for that exam therefore as the number of invigilators has increased dramatically, this has proved to be too inefficient.

Your help is greatly appreciated!

Thanks for your time
Dec 21 '09 #1
4 2279
MikeTheBike
639 Recognized Expert Contributor
Hi

One question

Can the record containing the checkbox be uniquely identified from the information contained in the sub-form and/or the main form (ie. PK information)?

If the answer is yes the there are two possibilities

1) Use the existing form you have just abandoned, but filtered when opened based on the PK information to return just that record, or, if this is not possible

2) Execute an update query in code on the specific record using the PK information

Does that make sense in this context?


MTB
Dec 21 '09 #2
g diddy
54 New Member
thanks for your quick reply mike! unfortunately the checkbox cannot be uniquely identified. i've thought about a number of possible solutions but i keep hitting brick walls. mainly because this subform depends entirely on the query - for each particular exam there are a certain number of invigilators so it would be ideal to have this checkbox appear just for them, but if i don't use the query the only other option appears to keep it as it was with just a button that gave the entire list. my knowledge with access isn't amazing though so i'm hoping there is away round this that i haven't yet heard of!? one of the solutions i had thought about was having an update query that would run when the check box was clicked that would update the record for that invigilator. but as the subform has multiple records on it i'm not sure this will work.
thanks very much for your time!
Dec 22 '09 #3
MikeTheBike
639 Recognized Expert Contributor
Hi

If by
subform has multiple records
you mean it is a continuous form, then the information available (or the value of the fields in the current record) always relates to to selected (current) record. Therefore, if the form RecordSource contains PK info then, when you use a button to open a form, this can be filtered to only show the record for the PK information for the currently selected record on tye sub/main form.

I don't know if that helps, but if you cannot uniquely identify the record to be updated, then you cannot update it (using a form or VBA update query)! If this really is the case then, perhaps, you database structure needs revising!

HTH


MTB
Dec 22 '09 #4
g diddy
54 New Member
thank you very much for your advice. i've got it working now. never would have done it without you!
Dec 22 '09 #5

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

Similar topics

4
2931
by: MUHAMAMD SALIM SHAHZAD | last post by:
dear respected sirs, i am in trouble as never expereince to run forms with queries based calculations here i am in insurance company they wanted this solutions: 1. tblRates (ID, Values1= 1000,values2=10000,Values3=100000) 2. tblInsurance ( ID, Premium, SumInsured) 3. tblCalcuations ("results")
3
6159
by: Richard Williamson | last post by:
Hi all, I have managed, using a quite tortuous route, to select certain records in a UNION query. This is based on the results of other queries. Question: how the devil do I change the value of a field in these, and only these, records? I have tried an update query and VBA all without success. I know help says that you can't change the values in a query if the data is from other queries or joined tables, but there must be a simple...
25
10266
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
2
1560
by: Dan Cook | last post by:
Ok... here's the scoop... I've got an unbound form with Serial Number, Building, and Room... all this is in tableA... Now I've got the form setup with building, room and serial number as combo fields... I've got it so that when you click the dropdown on Building it queries the table for all buildings, then the one for room queries for all the rooms in the picked building, and the serial number drop down queries on building or building...
0
4248
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET Applications and owner of Access Microsystems. Doug can be reached at doug@accessmicrosystems.com. --------------------------------------------------------------------------------
22
6287
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one client (MS Access vs ..NET Windows Forms) would be preferred over the other. While I have some good arguments on both sides, I would appreciate your points of view on the topic.
8
3481
by: chrisdavis | last post by:
I'm trying to filter by query or put those values in a distinct query in a where clause in some sort of list that it goes through but NOT at the same time. Example: ROW1 ROW2 ROW3 ROW4 , etc. I want to go to the first row, do a WHERE statement, return the
2
1656
by: lottaviano | last post by:
I have a form with two combo boxes. The value chosen in the first combo box (cbo1) is supposed to change the values that appear in the second combo box (cbo2). This currently works great for the first record entered by the user (continuous forms). However in the second record, cbo2 shows the values influenced by cbo1 in the first record, rather than the 2nd record (i.e. it doesn't update). My problem may be that both combo boxes have...
36
2384
by: CK | last post by:
How do I write a set based query? I have a groupSets table with fields setId, idField, datasource, nameField, prefix, active Data: 1,someIDfield, someTable, someField, pre1, 1 2,someotherIDfield, someTable, someotherField, pre2, 1 3,somethirdIDfield, someTable, somethirdField, pre3, 1 4,somefourthIDfield, someotherTable, somefourthField, pre4, 1 I need to generate records in another table by constructing queries from the data in groups...
0
9479
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
10311
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
10146
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
10080
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,...
0
6733
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
5509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4043
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
3639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2874
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.