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

forms based on queries - change values?

54
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_Form). 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

✓ answered by MikeTheBike

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

4 2257
MikeTheBike
639 Expert 512MB
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
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 Expert 512MB
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
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
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=...
3
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...
25
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...
2
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...
0
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...
22
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...
8
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 ,...
2
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...
36
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,...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.