Subform Query
Nov 22, 2005
I need to have a subform query embedded in my main form that when the user selects an item from a drop down box it will display the query results in the sub form. I have my query set up to work off of this drop down box I just can't get it to update on the subform when selected. Any ideas?
View Replies
ADVERTISEMENT
Sep 16, 2014
I have a form, a couple of comboboxes and text boxes on it. When these are filled out, the SQL of a query is changed using these parameters.
There are three subforms on the form, all pivot charts, all based on the query being changed.
The goal would be to update all three according to the user-given parameters.
Right now the subforms only update if I close and open the form, which is probably not the best solution, since it's too slow.
I've also tried to requery and refresh them, with no result.
Then I tried to overwrite the recordsource of the subforms with the same text that was originally there. This got them to refresh their data, but then all of the charts disappeared and had to be built again, so this is a no go too.
View 7 Replies
View Related
Apr 25, 2005
I'm relatively new to visual basic, and not sure how to do this one, was wondering if anyone can help.
If you can take a look at this screenshot
http://homepage.ntlworld.com/glenn_cassidy/ole0.bmp
Basically, what I'm looking to do is, when someone clicks on either command button, then the unbound subform will display a datasheet of the table in which the information is looked.
I have a table and ran 2 query's on the table.. One for showing all records with the department "Admin" and one to show all records with the department "Collections".
So when clicking on the command buttons, it shows these query's in the subform.
Was wondering what code to put behind the buttons to do this. Or even if there is any easier way to do what I'm looking for.. I will have about 10 departments, and each button will run a query, is this the best way to do this. ?
View 2 Replies
View Related
May 19, 2005
Is there anyway of clicking a button on the form to view the subform instead of it being there all the time .
View 1 Replies
View Related
Jun 14, 2005
Hi
I have a MainScreen Form in my Database which links to a subform giving a note of the Updates on the account. I have set this up as a Single Form with Navigation Buttons to move through these. All of this is fine except whenever you open an account it always shows the first update for the account.
Is there any way to change this so that the Navigation starts on the last account rather than the first. I know I could filter this but then you could not just flick back to look at previous updates.
Any ideas?
JC3
View 3 Replies
View Related
Nov 8, 2005
Dear List,
I've made a subform which is based on a query. One of the fields from this "Many" table is "Product Type", and the query asks to list all the product types except "Delivery" (in other words, 'not "Delivery"'). I don't want to see the Delivery items in this list.
The trouble is, the subform no longer has the blank row with the asterisk which allows you to add a new record into it.
I really need this subform to take new records.
What should I do?
Mrs Miggins.
View 14 Replies
View Related
Aug 9, 2006
I am making a form that will be used to enter info, then spit out an employee's pay for the time period. On the form are some goals or qualifications (I am assuming I will have to make queries for those but thats another story) that, if reached, bonus' will be added to final pay. The form will look up records for a specific date or time period for an individual and determine the amount of the bonus. I was wondering how to get a form to show the records in a subform like view. In other words, I want the user to be able to select say, phone calls made on the 10th of last month, then on the right hand side that record would show up just so he could see. (this is more beneficial when there is a date range but for ease sake I am going with one date right now) I am thinking it is a subform/query but am not sure and would like some help b4 I start wasting time on the wrong thing.
View 6 Replies
View Related
Nov 29, 2006
I have a frmCustomer as a main form with a subformOrders as a sub form.
I now want to add another subform that is based on a query I build. I only want that subform to refresh (update totals) when data is entered in the subformOrders fields. I am trying to use the TimeInterval, I created a macro that just Requery. But soon as I click in the subFormOrders field, It starts to do the refresh.
Any Idea's
View 2 Replies
View Related
May 3, 2007
Another one I'm struggling with.
I have a mainform and a subform. What I want to achive is :
click on a lable (lab1) in the mainform and set the recordsource ( query1 ) in the subform to display relevant data.
Click on a lable ( lab2) in the mainform and set the recordsouce (query2) having different data than query1 in the subform.
Hope this make sense.
How would I do this.
View 2 Replies
View Related
Mar 28, 2005
Hi all :D
Background:
I have a few tables, (products, Customers, Backorders, NewCustOrders)
And 2 main forms using a couple of subforms. One of the main forms has 2 tabs; Tab 1 shows current products list, Tab 2 shows back order list.
The other Main Form has 3 Tabs; tab 1 has the customer details, (that part is fine), Tab 2 has a couple of fields used from the first tab and a subform which is ment to be the customers order., Tab 3 is ment to show customers order history.
On tab 2, new order subform
I have 6 fields, ProdName, ProdSize, UsebyDate, ProdQuantity, Prod-R-Price, TotalCost.
Prodname and prodsize are combobox's
Totalcost is calculated from prod-r-price*ProdQuantity.
Main problem:
1)
I am trying to get the prodName to list each product Once only, not once for each entry in the table. How do i filter the combobox so it will only show one product name, even if there are multiple entries in the products table.
2)
Trying to filter the prodsize to only show available sizes of selected product - (From first question). not every size in the table as it currently shows.
This is driving me Nuts, i have looked for the last 4 months in over 60 books, allover the web, and asked anybody who has had anything to do with access. NO ONE KNOWS THE ANSWER!!!!!!!!!! :eek: :eek:
Thanks
Peter
View 1 Replies
View Related
Apr 27, 2005
Hi Folks
Attached is an example of what I'm looking to do.. I'm new to VB code and not great on queries either.
I'm looking to simply choose the department from the dropdown combo box on the form and the subform above it to update with showing all the results containing the department from the selection.
Not sure on the best way to do this, either via a query or from the table directly, or even some way to use the drop down to filter the table being displayed on the subform.
Anyone got any ideas. Thanks
View 2 Replies
View Related
Feb 4, 2006
Hello,
I wonder if anyone can help me I am using a select query as a subform, but it wont let me make any additions or changes. I have checked the properties of the subform and allow edits and allow additions are set to true.
Any ideas? Thanks in advance.
Regards
Nathan
View 4 Replies
View Related
Mar 2, 2006
Hi everyone
I've seen a number of threads here, as well as elsewhere, which suggest that it's good practice to use a query to provide data to a subform, rather than placing data directly from the table.
I can understand the need for this if a special function of the query is needed, such as selecting certain records, performing calculations with some fields, reordering the information etc., but what if the data is to be transferred without any such manipulation? Is it still better practice to put the data through a query (that simply takes all fields from the table and doesn't modify anything) or take it directly from the table to the subform?
My "gut" feeling is that it wastes time (albeit a fraction of a second!) to have an extra step between the table and subform and, I suppose, another step where something could go wrong.
Is my logic correct, or is it ALWAYS good practice to use a query to supply data to a subform. If the latter, I will change my practice and use more queries.
Thanks for your responses.
View 2 Replies
View Related
Oct 1, 2006
I'm a beginner of MSAccess programming,...hi anybody here who can help me or suggest regarding on my project where in my subform display as datasheetview act as detail record display wherein when I enter a number in my main form it searches in the record of detail table, if the number is found in detail table, it displays the all records related to that number in subform, and I want that I can edit or that records being displayed in subform...in other words my subform works as grid ..
Thanks
View 1 Replies
View Related
Oct 26, 2006
After a scary recovery I have a new problem: Intially I changed the 'Data Entry' property on a subform, in a multi-tab form :eek: My tabs all dissappeared. (My Bad!:o )
Now that I have recovered I get a message when I close the form, asking do I want to save the changes to the design of the query.
This only seems to happen when I have read a second or third etc record that displays a different set of records in the subform.
This is a HR mdb with leave records in the subform.
Any help would be appreciated.
PS I thought I had posted this 2 hrs earlier, but can't seem to find it. Hoping this isn't a second posting ...:confused:
.... added an image of error
View 1 Replies
View Related
Sep 11, 2013
Working with the attached mdb.
I am trying to search inside the subform.
First you should search for a "user", e g: a
On the second textbox, for a serial number: m1
Using a second query, I would like to search the input from the secondbox (Like I did with the first textbox).
Problem is that at the properties of the subform1 I was able to assign only one Source.
How can I add a second one? So it runs the second Query too.
View 8 Replies
View Related
May 9, 2005
This is a new post for this same question. The database that I am working on is set up in a very complicated way to me. The database tracks grant applications and awards. Right now there is a section in the database where one can enter a new record (Well this record is imported from an excel file filled in by the person who wants to update a current application or award for a grant) So when the amount changes on a grant a new record is created but the old information needs to be kept for future references. So this information is keyed into a subform on the same form as the new record. This is quite a bit of information, so I want to know if a button can be created to export this single record to the archive file set up on the same form (same format--different color fields- subform) Basically, I would also like to create a pop up question to say "Do you want to archive this record" the answer would be yes and the record would go to the archive subform (which is our archive query) I hope this makes sense. Thanks!
View 1 Replies
View Related
Sep 4, 2005
Hi,
Is there a simple way to add optional criteria in a query for a subform? Basically, what I'm trying to do is have a number of comboboxes in the parent form that indicate what records are shown in the subform (these records could then be added and/or deleted). I would like to be able to have a combobox such as "Month" that would filter the data shown in the subform to that month. If no month is selected, then the subform would show all months.
Any help would be much appreciated.
View 2 Replies
View Related
May 2, 2006
I have a subform that is populated by query results. In the query i have a field called Discussion that is just a free form field where the user can input any information. On my subform the field is not big enough to show all of the data if it gets large. Is there a way to add a scroll bar to this field on my qery so it will appear on the subform so the user can scroll down if necessary to see more of the text in this field?
View 2 Replies
View Related
Dec 20, 2007
How do you pass a primary key to an append query from a subform?
Example:
Main form Table Subscriber (subscriber-id primary key)
Linked (subscriber-id (main form) = ot-subscriber-id (subform))
One to many
Sub form - Other residents (ot-othres-id primary key)
From sub form append history record using primary key by query
With in query criteria [forms]![other residents subform]![ot-othres-id]
Does not work The primary key isnt being passed which shows in the subform. Pop up box appears.
View 12 Replies
View Related
Jun 21, 2005
I have this form where there's mention of CompanyID
In a subform, I have the information about all the contacts of this Company. In order to see full detail information for a particular contact (of that particular Company) I have a Combobox with a query.
At least: that's the whole idea. Unfortunately it doesn't work in Access:
SELECT Contact.ContactID, Contact.Name
FROM Contact
WHERE ((Contact.CompanyID)=(Me!frmCompany![ContactID]));
Can any help me? I need to do more of the sorts of queries... and I can't figure it out how to use values from forms and parent-forms.
Any help is appreciated,
Jazz
View 1 Replies
View Related
Jun 22, 2005
I wish to print the result from query in a subform. In my main form, I had a textbox call 'year' which asking user to input a valid year. The query will have to find out all the records that are in that particular year, one year before and one year after. After that, it should display the result in datasheet form. Can anyone out there help me in this matter?
My second question is Can we use crosstab query in the subform?
Thank you.
View 1 Replies
View Related
Sep 11, 2005
sales target table =
allows collection of employee sales figures in order to work out commission. Fields included are target, date, sales achived and commission allocation %. This info will be entered via a query below.
i need to create a query that allows entry of employees sales targets, sales achived, commission % and calculates the amount of commission due.
I will have an employee form where I want a subform to allow entry & calculations of employee commission.
How do I do all this? Please help
View 1 Replies
View Related
Sep 14, 2005
Hi,
This is a Query / Forms question...
I have 2 tables setup with a 1 to many relationship, simialr to 1 Customer having 1 or more orders. I created a query to prompt for all orders for a particular customer. I then created a form based on this query - i.e. linked the query to a form.
Now when I open the form I am prompted for the customer id and when I enter this all of the results of the query are displayed in 1 form. However, this is not what I want. I would like the orders for the customer to be displayed within a subform on the actual form. In this way the customer details will static and I can cycle through the customer orders in the subform separately.
Is there any way I can setup my query to display the results in this way? I need the prompt for the customer ID. Or is there any way I can setup the form to display the results in the above way?
Any help would be greatly appreciated.
Thanks
View 2 Replies
View Related
Nov 7, 2005
I want to do a query on a subform which picks up an ID field on the main form without using this as the connecting master, child key but finds this ID in one of two fields in the full table. My problem is, how to pass this field value from the master form to the query. I would use OpenArgs if I was calling another form, but how would one do this in a subform?
I would be most grateful for any assistance as this problem has been puzzling me for some time
View 1 Replies
View Related
Apr 29, 2006
HI
I need to konw how to Count different dates in a subform query?
View 2 Replies
View Related