Continuous Forms And Querying Another Table
Jan 23, 2006
I have a continouus form that queries a table and displays various fields on the form. For each record in the master table displayed on the continous form I also need to show the result of a calculation in an unbound field.
The calculation needs to be based on the Count of the rows of a particular type in another table. This other table will have many different types of record - and I have a query that returns the count. This query is based on a SQL WHERE clause that is fed in a value from a field in the master table. To be concret a field in the master table has the name ID_component. This field has to be then used in the query to determine how many rows in this other table has a type of ID_component. From what I can tell right right now is that the query which is triggered from a combo box in the form is not getting the ID_component value on a record by record basis.
My question therefore is whether using continous forms one can get an unbound field to do a query on another tabel when the query has to be fed in a parmeter from a field in the original tabel?
If this is not possible - any ideas on how I can achieve something similar to I can obtain a count of rows and feed it into a continous form
thanks in advance
John
View Replies
ADVERTISEMENT
Jan 31, 2014
I have a table called Tbl_Query_List that houses the query names that I want to be displayed on a continuos form. I want the user to select the query by highlighting it in the continious form and then having a command button at the bottom of the form.
I have everything setup including the command button. Assuming that on the EVENTS tab I set the OnClick to [Event Procedure] but when I click on the ellipsis what do I type to make it run the highlighted query?
View 10 Replies
View Related
Oct 23, 2013
I am mid way through a Access db and have a solid idea what i want from a form. The idea is for a rota display and edit form.
a tab control with 5 tabs (-2 weeks, -1 week, current week, + 1 week, + 2 weeks) and when the user clicks it lists all the employees (Employee Table) with any found rota entrys (Rota Table) populating into a text box type table with employees information blank where no rota information has been entered.
then the user can edit / add shift information from that table and hit save.
the main rota information is inputted by an excel import but this is done once a month and adhoc changes will be needed (holidays absence etc)
the only thing i found like what i want is a continuous form (which ive never used before but been told that wont go in a tab control)
How i would accomplish this (code snippets - doesnt have to be detailed just the fundamental functions so i can add modify to suit the information the sql's i already have its just the form controls.)
View 3 Replies
View Related
Nov 29, 2013
I searched without success for a solution to show small pictures (icons) in a table field to show up in a continous form.
Purpose is:
a communication log table has comm codes such as
- mail out
- mail in
- tel call in
- tel call out
the comm log table has the fields
CustomerID, datetime, CommCode
The CommCode table hast the fields
CommID, CommCode, Icon
The form (subfrm) should show in continous form mode to each customer..Datetime, (commCode), and to visualize the Commcode the small image (icon) presented by an envelope with an arrow right, an envelope with an arrow left, etc.
I cannot find a solution for storing those little images and retrieving them from an OLE-Field.All my other pictures I do not have stored in the tables, but only the image path, but for that I would prefer to store them directly into a table field as they do not blow up the database.
View 1 Replies
View Related
Jul 4, 2013
i'm creating a database which holds all animals. i'm trying to make the parents selectable in a subform based on the same table as the main form - this doesn't work for whatever reason ("table is already opened exclusively by another user,..."). it can't just be one field or a query, it needs to be a subform because besides name and eartag i also want to display a small picture of the parent and only the filename is being stored.
i'd really like it to be selectable records in a continuous subform, so the risk of selecting a wrong id is minimized. is there a way around this not being able to use the same table for a subform?
View 14 Replies
View Related
May 18, 2013
I have a continuous subform that displays lots of questions. This specific form has 10 questions on it. Each question has one answer and the users are required to select one answer for each question. I am trying to do some data validation before the data gets saved to my table to ensure that users have answered all the questions. I found some very useful code online and tweaked it to suit my needs. The validation works perfectly on subforms with only one question, as I have some other tabs that use it.
On the specific form that has the issue, the validation works as expected when no question has been answered, but when a user answers only one question and leaves the remaining nine questions blank, the validation does not work. I guess it is as a result of the continuous form repeating the different questions and ms access thinking that the data entered for one question alone is complete when it actually isn't.
Code:
Private Sub Ctl4_frm_Staff_Exit(Cancel As Integer)
Dim ctrl As Control, EmptyStr$
For Each ctrl In Form_subFrm_staffQuestion.Controls
If InStr(1, ctrl.Tag, "Required") > 0 Then
If IsNull(ctrl.Value) Or ctrl.Value = vbNullString Or Len(ctrl.Value) = 0 Then
[Code] ......
View 1 Replies
View Related
Dec 9, 2007
I have a very simple database with two tables. One stores Schools that I work for and the other holds people that work at that school.
I have a form that displays information from the schools table and I have a button that I want have open a form that displays the people that are related to that school.
THe problem is I can't figure out how to limit the recordset to just the people from the school record I was just viewing.
For example. I am looking at a record with School ID 1. I want to run a query on the People table that will return just the people that work for school id 1. I just can't figure out the criteria part.
Any help is appreciated.
Thanks
View 3 Replies
View Related
Aug 8, 2005
Is anyone else experiencing similar problem ?
Basically here's what happen:
1. User need to look up item name, while in a subform. He pressed F5
2. A form showed up, with a ComboBox (which got its values from a query)
3. User chose an item name in the ComboBox, and then pressed the Close button
4. The item name got copied into the subform.
Problem is, for some items/records, step 4 doesn't happen :eek:
When I investigated, turned out that for some records, the ComboBox returned null (instead of the selected record)
This is on a 5800+ records table, on Access 2000.
Here's the code :
[Forms]![005_cashier].[subform_0051_enter_sold_items]!selling_price = Me!item_name.Column(2)
[Forms]![005_cashier].[subform_0051_enter_sold_items]!quantity = 1
The second line always works (always got copied to the subform properly), while the first one only works with certain items/records.
I've examined the offending records, but couldn't imagine how they'd be able to make Access to behave like that.
Any ideas ?
Thanks,
Harry
View 2 Replies
View Related
Jun 16, 2005
Hi,
Need some help. Here's the problem:-
I've two fields in a table (A & B)
A B
1 Null
2 Null
3 1
4 2
5 3
6 5
7 Null
8 4
9 6
The fields are somehow related where values of B (unique) is taken from A(unique).
I trying to do an SQL such that if I input a single value A=9 or 6 or 5 or 3 or 1, the following should be the output:
A B
9 6
6 5
5 3
3 1
1 Null
Or in another case where I input a single value A=8 or 4 or 2
the following should be the output:
A B
8 4
4 2
2 Null
How can I do that? Many thanks in advance!! :D
View 3 Replies
View Related
Jan 18, 2013
I have a data base,one of the field contain Data like "ZZZ-DEFS#UUH1234567".
There should always be 19 characters in this field including #.I want to design a query which can sort out entries less than and more than 19 characters, so that wrong entries can be corrected .
View 3 Replies
View Related
Feb 12, 2006
Hi,
I need to run a parameter query in which you enter a product number and the query (a) returns the list of components and (b) then automatically reruns the query for these components. In other words, I enter an input (a product number) the query gives me outputs (component numbers) and then reruns the query with each of these outputs as the input (i.e. I want to know what are the sub-components of these components). This process stops when all the components are raw materials -- this will be easily identifiable.
Does anyone know how to set-up this type of query?
Thanks!
Andre
View 1 Replies
View Related
May 8, 2013
I have a linked table in my access accdb file to a view on a SQL Server DB.
One of the columns is a date column, where only the time value is important, so it's stored in the default format, like 12-30-1899 12:00 AM.
In SQL Server, I can query records that fall between a certain time frame. It works in Access when written as an ADO query (that's another story), and it also works when I convert the view to a local access table.
But when I query it as a linked server, it will return everything is greater than 12-29-1899 11:59 pm, but when I try to search any date/time ranges on 12-30-1899 nothing is returned. This seems to be a bug in Access.
The reason I no longer use ADO, is that the results would not print. For some reason, when I go to print preview, Access would evaluate the query I'm passing through to SQL Server and throw a syntax error. I miss ADP.
View 3 Replies
View Related
Mar 8, 2012
I have a Traits table that has fields TraitKey and Trait and I'm looking for the subform to show one record for each trait so that I can give the employee a score for each trait.
I'm trying to save that score in an EmployeeTraitScores table that has the fields EmpID, Trait, Score.
If I bind the subform to the traits field, the continuous form shows each one properly but then I don't know how to save to the scores to the EmployeeTraitScores table.
If I bind the subform to the EmployeeTraitScores table then it can save a record but I can only get the Dlookup to show the first trait.
View 3 Replies
View Related
May 29, 2015
I have a bound continuous tabular form,However, based on data content in one field of a record, I want a checkbox in the same record enabled, so the user can check it if necessary. I have created a record set using the form as shown below, and I am looping through each record. To show that my code is referring to the field with required data content, I display it as a message box and it works, yet my checkbox does not enable.
I have the code in the form_load event, however, for testing purposes I have it behind a button.If I am seeing this properly, the code behind the button enables the checkbox for ALL records once the criteria in the required field is true, and based on the last record, which has no data content, it disables the checkbox in ALL records. I also have the PK ID for each record hidden in the form. Can I utilize that to target the checkbox of each individual record??
Form Detail
-Form does not allow additions or deletions. Edits allowed
-All fields are disabled and locked
-I only want the check box to unlock if data is found in the "RequiredField" as referred to below. I have also tried if not isNull(requiredfield.value) then -enable checkbox, which yields the same results
Here is my code
Code:
Dim rstMyForm As DAO.Recordset
Set rstMyForm = Forms!MyForm.Form.Recordset
rstMyForm.MoveFirst
Do While Not rstMyForm.EOF
If Not RequiredField.Value = "" Then
[code]...
View 14 Replies
View Related
Apr 26, 2013
I am trying to perform a search function query in access but am having trouble. I have two tables. One table has a column in which I need to search the contents of this field by referencing data in another field/table. I am able to write the query searching the data manually (not referencing the other table) but can't seem to get the query right when referencing the other table!
this query works =
SELECT *
FROM Sample_Data
WHERE (((Sample_Data.[Affected_Frequencies]) Like "*451.425*" Or (Sample_Data.[Affected_Frequencies]) Like "*451.400*"));
but, i put together a frequency table (Table name = Frequencies) and the column within that I am searching for is called Frequency. im trying to reference Frequencies.Frequency using a LIKE statement.
View 1 Replies
View Related
Aug 17, 2015
I'm trying to set up a sum field in the footer of a continuous forms form but I'm stuck on the code. The field is amount and I need the sum field to show the total of all the records on the form.
View 5 Replies
View Related
Aug 14, 2015
i have a continues form that lists all my active items and I'd like to use it to quickly check if they have all the data inserted, ie entries in each separate table. it looks like this
I perform a simple check on form load chk = DCount("[phID]", "preh", "[phbID] = " & Me.tID) where me.tid is the item ID and this gives me 0 or 1 and writes ok, or missing into the appropriate box.Problem is it tkaes value for the first item and repeats it for eah other, so I get ok or missing throughout the continuos form.How can i force a check for each line?
View 1 Replies
View Related
Apr 14, 2014
I have a drop down box on a continuous form called (cmbItem).When the users choose Option 6 (Other) and on the open event I wish to show another field txtOther which allows the user to give a description of what 'other' means but I only want to show the field for that record. (the user could potentially have more than one record as other)Using conditional formatting I have managed to change the colours of the box so that the background is the same colour as the form unless other is chosen when it reverts to white. However I can't do the same with the border as this is not one of the options provided.
View 2 Replies
View Related
Feb 26, 2006
I have just created a new continuous sub form within a main form to display bookings of a particular date. The date field is in the main form, when updated, the data in the sub from updates. Before this, I was using a list box, however I changed to a continuous sub form since I wanted to have conditional formatting.
Now I'd like to have the option to choose a row of data from the sub form and then enable/disable a command button on the main form depending on certain critera...i'd like to know what is the best way to let the user choose a particular row of data...
i have thouhght of a command button or a option button, but it seems that the control wouldn't have a unique identity pertaining to the row..
any ideas appreciated..
many thanks..
View 2 Replies
View Related
Aug 24, 2006
I have a contiuous subform on a main form that i use to enter multiple products for a price check.
I am using Dlookup to pull the description and other details into their respective unbound textboxes on the subform.
The problem im having is that when i enter a partno into the text box on the next line it changes the description and other details on all the lines.Is there a way to stop this or any other way of adding multiple product lines.
Thanks in advance.
View 1 Replies
View Related
Oct 14, 2006
I have a form where I'm entering data relating to each inbound shipment such as date of arrival, vessel name, etc...however i'd like also to enter invoice numbers and values that cover each shipment. one shipment can have more than one invoice. this means that for one shipment i need to enter , for example, 10 invoice numbers and 10 values.
I thought abt having two tables...one table having the shipment data and another table that keeps the list of invoice numbers/values of the shipments (having a foreign key relating to the shipments table).
now...i have an issue on how i'm entering the invoice numbers/values on the form..since the number of invoices might vary with each shipment...i thought abt having a continuous form...i set up one with two unbound fields...invoice number and value...but as soon as i enter data on one row, all the rows become with same value. any feedback on how should i approach this issue?
am not quite sure at what stage would the data in the continuous data be appended to the table..i'd like to have it save to table as soon as a command button in main form is clicked..
appreciate feedback....thanks! :)
View 14 Replies
View Related
Feb 8, 2005
Okay. I am trying to build a form where I could get information like this but also editable. It can be either bound or unbound with enough information to update the records. I could do this several other ways but would prefer it just like it is below. Any ideas is greatly appreciated. Sam.
REPORT_NAME_1
Active(y/n)
ELEMENT_1 Included(y/n)
ELEMENT_2 Included(y/n)
ELEMENT_3 Included(y/n)
REPORT_NAME_2
Active(y/n)
ELEMENT_1 Included(y/n)
ELEMENT_2 Included(y/n)
ELEMENT_3 Included(y/n)
REPORT_NAME_3
Active(y/n)
ELEMENT_1 Included(y/n)
ELEMENT_2 Included(y/n)
ELEMENT_3 Included(y/n)
View 1 Replies
View Related
Oct 9, 2005
Hello !
I am pretty good at coding in many languages and i learn fast good some realy complicated stuff but hey...when it comes to easy...i am just out of luck :(
What i am trying to do here is have a continuous form linked to a table of loged event and on the Form Header have fields ([eventNumber],[DateFrom],[DateTo]). I would like people to be able to "filter" by event number (that would bring a single event and the probleme is not there) but in many cases, we need to get events from a range of date.
1) How can i make it so that when someone change in [DateFrom], it will display only those from that particular date
2) How can i make it that when people change [DateTo], it will give the events in my continuous form from [DateFrom] to [DateTo]
3) Why easy things are so complicated :(
View 1 Replies
View Related
Oct 22, 2006
I am having problems with Continuous forms....I had already started this in another thread but now i restructured a bit and better to start new...
Attached i'm attaching a sample DB with what I have...
In Form1, i have a subform subInvoices....in the footer of the continuous form i have a total that sums the invoice amounts. i'd like that when the user clicks the command button, that total is transferred to the text box 'value of goods FCY'. i tried doin it as u can see in the DB but i'm getting an error...
also, i'm still not feeling comfortable with the updating of the continuous form table 'SInvoices'. i'd like the changes to the subform are updated to the table when the user clicks the command button. is this at all possible? also is it possible to update certain fields in the table that are not mentioned in the form..for example i'd like to remove the columns currency and shipment ID from the subform and these would be taken automatically from the main form controls (Shipment ID and Invoice Currency respectively).
I appreciate very much your feedback.
Thanks:)
View 8 Replies
View Related
May 4, 2005
This may seem like a silly question but, Is there any way when a number of records show in a continuous form (that is a subform) and you allow additions, for the new record to be at the top of the subForm and the rest of the records to sort below it.
The sorting seems to effect the existing records not the new one (which being new has no data).
I know I could append the new record and then open the form without the capability of additions and sort it so that the new record is on top.
Thanks
View 2 Replies
View Related
Jun 15, 2006
From another forum, I found a way to kind of sort of use an unbound continuous form.
Create the form with no recordsource.
But create the textboxes with a recordsource of the field name where the data is going to come from.
in Form_Load you open a recordset, then set me.form.recordset = rs.
The form is not actually bound to the table or query, but to a copy of the records in the recordset. It is read-only.
To get around it being read-only I want the user to click on the field they want to change. This opens up a editable text box where they can change the text. I then do an update sql to update the source table.
But the recordset still shows the old value. So I have tried to do a me.form.requery. The first time it appears to work. The form has the updated value, but more often than not, all the records after the first seem to be dead, the click event does nothing.
If I had edited the first record, more often than not, all the fields in all the records will say "#Name?"
Any ideas what is happening?
Thanks,
David
View 9 Replies
View Related