Say I have 3 fields in my table: FstName, MidName, LstName.
I want to be able to dynamically change the sort order of a query to different sort orders using the same fields via a form.
I may want to see the records sorted by LstName, MidName, Fstname; and another time see the list sorted by Fstname, Lstname, MidName; and other times by any combinations possible using the 3 fields.
I see 3 options: filter by form; programatically change the SQL Order By clause; or concatenating the table fields together in the desired order via a custom function and sorting by the function result.
Is there any difference in query/form performance between the 3 options?
I have a form that shows a list of all of my records in my database. I want to be able to click a button called "Report" and have that print a report that has all the records I have filtered on my form. I have a report in the format that i want it in, however, currently it prints every record and not just what is shown on my form. (The form is dynamic and I want the Report to be dynamically based on the form) HELP PLEASE!
Hi all. I've created a database which contains information about stores. I want to have the forms automaticly sorted by the department number. I've tried to sort the table by department, but when I try to add a department, the sorting doesn't seem to affect the form at all.
Lets say I have department 1,2,3,6,7,8 in the form, and I add department 4, it will be the last post in the form. I want it to be the fourth, and so on..
I'd apreciate some help with this :) Thanks
Here's the database (http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=12934&stc=1&d=1142018915&PHPSESSID=f730b7f11f6983965698faeacbe5a1ee)
Hey, I made a table Products: order number (key), name, supplier, price,... I copied it into a query, and made a form of it, so I can look up products by order number with a combo-box. Now I'm into my next step (and it gives me a headache): In the form I added a new text box, where I should put the incoming amount of a product in, and another text box to put in the products that are empty. Now the question: how can I make a query that counts the amounts of incoming and empty products, as well as the difference between those two, in a way I can do multiple additions? I hope you know what I mean by dynamic sum: start stock=0 first delivery: +3==> stock 3 +next delivery: +6 ==> stock 9,...
Hi guys, I am trying to create a form or subform that should be created after a button is pressed and some complex filetering is occured and records are saved in a multiple arrays so I need to generate a form and controls according to those array values. Please help.
Actually I can not get data directly out of the query its just too complex bla bla bla. Finally I have three arrays each array has same number of values and I want to generate a form on the basis of the values of the array. Please Help me. I have tried creating form but Could someone please show me the right path.
Now, I don't know if this topic should be in forms, queries or reports, so I decided to post it here in general until someone gives me a big bollocking and send this topic elswhere :D
I have a table with loads (50+) of columns which hold information about people in our company. What I want is a form? that allows me to tick the information I want and then displays the result in a report. So, today I want a list with Name, address, town and phonenumber, but tomorrow I might need a list with Name, phonenumber, passport number and expire date. In short, I need to make a 'dynamic'? report that displays the options I ticked out of the 50+ options (does this make sense?). I searched for it but no luck so far. Ta in advance
Categories contains one field: CategoryName Subcategories contains two fields: ParentCategoryName and SubcategoryName.
In a third talbe I want to select a category from a listbox, then have the subcategory listbox update automatically with the possiblities. Is this possible?
Not sure that this fits under table but I believe that is the root of the solution, so we'll try it here.
I'm building a database to simplify the process of creating a PC build sheet for my company. I would like it to track pricing and everything as well so here is where the problem comes in:
Say right now a floppy drive costs our customer 10 dollars. In a few months, we could still be using the exact same floppy drive, but the price has dropped to 9 dollars. If I run a report to display all computers sold in the past year (including pricing), I want the floppy to have the price that the customer paid at the time; not the latest 9 dollar price only.
Correct me if I'm wrong, but here is my thinking: I could run a macro to rename the $10 floppy drives and update it in all old records (though I have a feeling I'd have to pull a trick out to mess with UIDs) then update the price on it for the list of options when building out a computer, but it seems like I should be able to automate this better.
Possibly some sort of linkage table?
I'm just trying to keep this as clean as possible so I'm not digging back through this a year down the road.
i have a database that imports files with dynamic amounts of fields, runs querys on the data and outputs it to a speadsheet. The The problem is instead of making it run querys on each column, i have it running on them all collectively. Now i want to change it so a query is run on each column then output to its own spreadsheet. Does anyone know how to do this?
Dim Db As DAO.Database Dim QD As QueryDef Dim where As Variant
Set Db = CurrentDb()
' Delete the existing dynamic query; trap the error if the query does ' not exist. 'On Error Resume Next 'Db.QueryDefs.Delete ("Dynamic_Query") 'On Error GoTo 0
where = Null where = "WHERE ((([(Table) Denton Routing].UNIQUE_LANE_ID) In (SELECT UNIQUE_LANE_ID FROM [(Table) Denton Routing] where" where = where & " [(Table) Denton Routing].[Location_ID]= '" + Me![Text35] + "'" where = where & " AND [(Table) Denton Routing].[Final_Dest]= '" + Me![List29] + "'" where = where & " AND [(Table) Denton Routing].[Ship Day]= '" + Me![Combo46] + "'))"
Hi all, I'm currently strugging with an Access problem and wondered if anyone here could give me some ideas. This is fairly complicated to explain, so please bear with me!
Basically, I have a query that pulls out a list of users, and another query that pulls out of a list of possible applications that that may be assigned to them.
What I need to do is present this in a form, so that my app user can browse through the list of users, and assign/deassign applications to that user. I'm thinking of presenting this along the lines of a list of users down the left of the screen, a list of apps along the top of the screen, and a checkbox for each app/user combination.
The complication is the list of possible applications is different every time the form is loaded. There are 1500 possible apps, and ANY combination of these may be available.
My most recent attempt at this was to find the list of apps, and then (using vba) create a temporary table, with a "User id" field, and then a "yes/no" field for each app that is available to this group of users. I can then present this in a subform, allowing the tickboxes to be viewed and modified for each user/app combination.
However, my problem is that when I dynamically try to alter the recordSource of the subform, the field names are different each time, so it doesn't display the app names I need. I've searched Google etc, and the only relevant suggestion is to have multiple subforms, and display the one that suits. However, with such a huge number of possible combinations of apps, I cannot take this approach.
So, is there any way that I can easily update the subform to have the correct columns? Or am I going about this in entirely the wrong way?
Any suggestions will be gratefully received - I'm hitting a brick wall with this at the moment and don't have much hair left to pull out!
I have a main form that displays different part numbers and the corresponding material type for each item. For example,
Part 1 metal part 2 candy part 3 label
I have created specific subforms based on the type of the material. I want to place a command button on each record, and when the button is clicked, the correct subform based on the material code will open. For example, the above 3 items are displayed on the form, if the user clicks the button next to candy, then the candy subform opens and if the user clicks the button next to label, then the label subform opens.
hi, i'm having a problem making my report dynamic, i have a query which returns the payments due in the next month, my question is, if i have a form based on this query, how can i make it so that, if i need to print an invoice for one of the customers, lets say the currently displayed record, how can i limit the customers displayed in that report (invoice) to just the current record that i want the invoice for?
I have several tables but lets focus on two Table1 and Table2
Table1.ID is a foriegn key in Table2.NewID
I want the default value for Table2.NewID to be the MAX of Table1.ID; that is I want Table2.NewID to auto default/select whatever is the highest ID of Table1.ID. I have toyed with this as much as I can by entering different SQL statements in the the default field of the datasheet. And by defining different Macros for OnFocus event.
I am looking to basically update the hyperlink base every time the database is opened to be the folder that the database is currently in.
We are trying to make the database and supporting information portable, so that people can copy the entire folder anywhere on their computer and all of the links will still work. I can't put all of the info in the database because we are already pushing the size limit.
I would like to keep it from getting terribly complicated, as others will have to update this database with more info in the future and make the links themselves.
If there is a better or different way of getting the same result without going through the hyperlink base, that is fine.
Hello to all, I created a dynamic report based on cross tab query, the header is a sub report. Number of lines and rows depend on the data typed in a form. Here is my problem. When numbers of rows exceeds for exemple 15 the header and detail line continue on the line below i would like the report continue on another page (see below).
I have a form called Order Details and when entering the products through my form I have two "Lookup" fields, the first which is CatID which will return a dynamic listbox in the "Categories" field containing "Floors, Exterior, Interior" pulling from the Categories table.
The second is SubCatID which will return a dynamic listbox in the "Sub Categories" field containing "Carpet, Vinyl, Wood, LapSiding, Shingles, Insulation" pulling from the Sub Categories table.
I am however having problems with my third which is "ProdID". I am wanting it to also be created dynamically through a "Lookup" on the Products table. I want when I choose for instance, "Floors" and "Carpet" from the Order Details that only the choices that match those two ID's populate the "ProdID" field and only the products for carpet not for Shingles or other sub categories.
As much as I would like to tell my boss he's insane I'd also like to keep my job. I know this is possible, but it sounds very complicated. Basically, I need a way to generate queries on the fly. This is geared towards someone who doesn't know SQL of course. I know basically what he's looking for, comparing sales over some period of time. However, he might want annual numbers, quarterly numbers, percentages, overages/shortages, and any kind of sales related query you can think of. The only way I figure I can do that is to have a form build the SQL statement, save the SQL statement as a query, then have him open the query. Is there another way I can do this without necessarily saving a query first?
I've got a database that I need to import a vacation days table from an excel sheet. The biggest deal with it all is that the excel file & range it needs to search for the data is dynamic, actually I also need to be able to scan different sheets within the excel file.
Now, im not new to all this stuff, ive done all sorts of complicated excel manipulation in VBA as well as queries and custom processing, but I've been away from it all for roughly 8 mo. so im rusty.
If anyone has a suggestion about how i could go about loading the excel file (dynamically) and pulling information from it (i will be doing aggrigates like SUM & Count, however i can program these manually if need be.)
I want to generate a different drop down box dependent upon the criteria of another selection on a form.
For example, when the user selects "fish" from the drop down, the query criteria lists only those animals whose animal type is fish. If the user selects "reptile" from the first drop down, the query criteria changes, so the next drop down box lists those animals whose animal type is reptile.
To summarise:
Choices in drop down 1: Fish Reptile
Choices in drop down 2:
If Drop down 1 = Fish Cod Haddock Shark
If Drop down 1 = reptile Snake Lizard
Is this possible, and how do I go about structuring it.
I want to generate a different drop down box dependent upon the criteria of another selection on a form.
For example, when the user selects "fish" from the drop down, the query criteria lists only those animals whose animal type is fish. If the user selects "reptile" from the first drop down, the query criteria changes, so the next drop down box lists those animals whose animal type is reptile.
To summarise:
Choices in drop down 1: Fish Reptile
Choices in drop down 2:
If Drop down 1 = Fish Cod Haddock Shark
If Drop down 1 = reptile Snake Lizard
Is this possible, and how do I go about structuring it.
I want to generate a different drop down box dependent upon the criteria of another selection on a form.
For example, when the user selects "fish" from the drop down, the query criteria lists only those animals whose animal type is fish. If the user selects "reptile" from the first drop down, the query criteria changes, so the next drop down box lists those animals whose animal type is reptile.
To summarise:
Choices in drop down 1: Fish Reptile
Choices in drop down 2:
If Drop down 1 = Fish Cod Haddock Shark
If Drop down 1 = reptile Snake Lizard
Is this possible, and how do I go about structuring it.
SELECT * FROM qryForCreateReportSold WHERE (((qryForCreateReportSold.Fund) Like '*STP*') AND ((qryForCreateReportSold.[Sale Date])>=#7/1/2005# And (qryForCreateReportSold.[Sale Date])<=#6/14/2006#));
The user fills out a form and hits run query and the value STP gets passed into the query criteria.
My situation is that there are claaifications such as S/STP, E/STP etc and the problem is all these projects also show up whereas I want projects ONLY
under the STP classification.
I guess the problem is due to the fact of the *STP* which means pick all records that have an STP in them...
If I manually get into the query and remove the * * then the projects ONLY with STP show up.( which is exactly what I need)
Can some one suggest something to remedy the situation.
Hello everybody! i want to create a table consisting of 2 columns. one column may contain constant values and the other has to contain dynamic values (values of the second column must depend on the values of the first column). For example if the constant of the first column is ID then the variable of the second column will be ID+5. Something like that below