One of my forms has a load of data displayed in it from a query and I would like to allow the user to sort this data by means of some buttons next to each column heading. For instance clicking 'up' next to first name / last name etc will sort ascending on first name, 'down' will sort descending etc. I tried setting up different queries for each sort and changing the record source of the form in the on click event but then the controls don't seem to know where to populate from!!
I have a table with product numbers and their cost. That table has 3 fields : SKU, Cost, Month. (The cost can change every month, therefore the list is built to have a cost / month)
I want the user to be able to input the data in the table using the form but I would like the form to be sorted Alphanumerically for the SKU numbers and then per month (in their normal order not alphanumerically).
I have a combobox (named month for testing purposes) to force the user to select one of the 12 months and the field type is Text.
Also I am unsure how to "autosort" (or apply a permanent sort) the form whenever it's opened. Will it be applied if I just set the sort and then restrict the user from seeing let's see design mode?
I have a simple form with a text box, I enter a series of part numbers separated by newlines, and then I use the following code to query for each of the separate part numbers:
Code: Dim strSql As String Dim part_nums() As String Dim num As Variant Dim multivar As Boolean multivar = False
[Code] ,......
This all works perfectly, but what I need to do is have the query return the records in the same order I entered the part numbers. They are automatically returned in alphabetical order by item_no, and when I enter 15+ part numbers it becomes slightly difficult to search through them all on the form to find the one I am looking for. It would be a lot easier if they were output in the same order that I type them in. Is there any way to make this happen?
Ok, I am a noob at reports and did a search on this. My searching DID NOT HELP ME! I thought I would make that clear :D Maybe someone can tell me what to look at for this issue.
I need to take one report, allow the users to easily use a dropdown or listbox on a form to Sort and Group many fields of data. To recap: The user will click on name in the list and it will sort report by name. Also I need them to be able to select up to three sort criterias.
I am currently implementing a stock control database in access. I have various forms for entering stock in and taking it out etc. It all works fine except I need a way of sorting my data to produce very specific reports. The company wants reports to be listed in a very specific order. I have many fields with which I have to sort the data so it has proved a very time consuming problem.
I have tried the custom sort order techniques involving the switch function, however due to the large extent of data in use this approach has limited success.
I have also tried merely applying numbers to the front of a stock item to sort it, however this is a very basic approach and means the user has to look at random numbers before actually reading the stock item in reports.
One approach that could work would be to have a sort order as a separate field. But the user would have to then enter a sort order number each time data is entered(?).
Does anyone have any ideas as to how to solve this problem?
I have a combo box based on a table. The table is sorted by the Customer surname field using the Order By property. My Problem is the combo box will still display data in the unsorted order ie in Primary Key order.
Any suggestions on how I can make the Combo Box display dat in ascending order of Customer.
When I open my form the data are sorted through the ID, How can I change that to be sorted through the Year? On my form properties is that the Filter is responsible for sorting?
I need to create a absenteeism database for work . I have attached a sample data for you to see how my table is in access.
so the fields that i have are name, team leader, date, code, department, minutes.
from this raw data I need:
1) a high level summary report that groups all ccps by team leader and how many hours the team leader has and each individual ccp.
2) summarize by code the hours each ccp has and also occurence. if the ccp has been sick 3 days in a row then it is considered 1 occurence. if they have been sick multiple days but are not concurrent then each one is an occurence so i need that info categorized by month and tl.
3) a form where the user can pick what codes they want to see from a check box / list box (which one would be better?) and group those codes by ccp and team leader month over month.
This is related to "Old_value, new_value" thread I posted yestarday (Module&VBA).
I have a problem i missed yestarday. The code it's vorking great, but it allways takes the showed new_value and makes it old_value for the new record, and this is a problem, because the showed record is not the last for that customer. So, I was thinking that if I make a new Autonumber field in my table, I could sort descending the values and this way the input form will allways show me the last entered data for that person. As I noticed from a long time ago, if I sort a table that allready has a form, the form won't show the records sorted. Why? It's necessary to make the form again? I tried to order the data on the form from Properties window ->Data->Order by, but the ordering is Ascending and I need it Descending! Can enybody help me?
Hi. I was doing a simple query that resulted in a "data type mismatch in criteria expression" error. Hunting around for the source I realized that when I attempt to sort a column of numerical data a hidden decimal point is inserted and what should be an order of : 45, 10, 9, 2, becomes this order: 9, 45, 2, 10 (i.e., 9, 4.5, 2, 1.0)
I have a Form which contains a datasheet and I have some code which allows users to custom sort this datasheet. Another table based on this datasheet is then exported as a csv file. However, the data is obviously not exported in the same order as the datasheet and it is quite critical for the application to be a sucess that it is exported in the custom order chosen by the user.
I have done some re-search, searching groups, forums etc and found the solution of having a 'sort column' in the table the datasheet relates to, I can then use this in the query that exports the data. My only problem with this is I had to manually fill in this sort column in the datasheet, once I had decided upon my final sort order. Is there anyway to fill this column automatically based on a row's position in a datasheet?
I have a form I created in the past that auto-fills some of its fields based on the user's selection of a record from a combo box linked to another table. The form has been working perfectly however I recently tried to add a couple of more fields to the form that need to be autofilled. I added the new fields to the source table and added columns to the combobox that should allow my VB code to fill those boxes. However only one of the new fields is filling correctly. After trying a few different things I notice that the problem seems to be with whatever data field becomes the 21st column in the combobox. Is there some sort of limit on the number of columns contained in the data source for such a box?
The recordsource is a query with over 6,000 records. The form currently lists the records in datasheet format with header and footer for things like buttons and filtering. The client wants to be able to go from page to page of the souce query, showing 100 records on the form at a time.
But at the same time, they should be able to filter or sort the data source in it's entirety. The person who created the form came up with what seems like an awful solution to the problem. It seems to use a random number generator to determine how many records to portray at a time. I see this in the code as well as in operation, because the number of records on page to page varies. It doesn't even start out at 100! Worse yet, using a sort on the page only sorts the records that are visible.
i made a report based on a query. when i run the query, my results are sorted by Job Time Ascending, like i want... when i made my report i chose job id as the main group priority in the wizard..
now in my report it displays the jobs in ID ascending, rather than Job time ascending as my query says..
i dont want to re-do the report it took ages.. how can i fix this?
I have a form in Access 2K that properly displays city, state and zip codes. As I type in each letter of a city's name into the combo box, I get the first city in the sorted list displayed (autofills). That's fine when there is only one zip code for a city, but when I enter "chic" for chicago I still get the first chicago zip code in my table.
It sure would be nice if I could do a "sort within a sort" so that if there were two or more records with the same city name then that whole group would drop down so I could choose one of the other zip codes. If this is doable, kindly point me to an example as I need all the help I can get.
I have a query that sorts players batting averages from highest to lowest. When I run the query just by itself it sorts it right however when I open the report based on that query it does not sort in descending order like I asked. What am I missing??
I am fairly new to Access, and need some help with what I thought would be an easy project. I have an Acceess table that contains data on settings for machines in my plant. There are columns for part #, Machine #, part type, etc. All in all there are about 20 different columns. Now what I need to do is have a form where a user can enter one or two fields, and print a report that contains all the information from all 20 columns.
For example, the user would enter Part number "AB1234" on machine "15-1" and would get the following data from the table:
Part # part code Equip. Temp height etc AB1234 A 15-1 100 5.3 ... AB1234 B 15-1 200 6.3 ... AB1234 C 15-1 250 7.3 ...
They could then somehow choose exactly which record they wanted (example : ABC1234 B) and print a report that contained just the data from that selection.
I hope I explained this clearly enough. Basically I want a user to be able to enter 1 or 2 selection fields and then be able to print a report that contains info from 1 row in 1 table. Any help would be appreciated. I am somewhat new to this and havee a basic understanding of Access and A moderate understanding of VB. Thank you in advance for your help.
I am just learning how to use Access and have created a basic form. I am stuck though on getting my form to calculate the Age (from Date of Birth) in Years and Months.
The info on this forum I have tried the following Expression:
=DateDiff("yyyy",[DoB],Date()) & " years and " & DateDiff("m",[DoB],Date())-(DateDiff("yyyy",[DoB],Date())+Int(Format(Date(),"mmdd") & lt;Format([DoB],"mmdd")))*12 & " months "
But my problem is that it tells me:
''The expression you entered contains invalid syntax You omitted an operand or operator, you entered an invalid character or comma, or you entered text without surrounung it in quotation marks''
Can anyone let me know what error I've made and how to fix it? It would be much appreciated. Thanks
I am just learning how to use Access and have created a basic form. I am stuck though on getting my form to calculate the Age (from Date of Birth) in Years and Months.
The info on this forum I have tried the following Expression:
=DateDiff("yyyy",[DoB],Date()) & " years and " & DateDiff("m",[DoB],Date())-(DateDiff("yyyy",[DoB],Date())+Int(Format(Date(),"mmdd") & lt;Format([DoB],"mmdd")))*12 & " months "
But my problem is that it tells me:
''The expression you entered contains invalid syntax You omitted an operand or operator, you entered an invalid character or comma, or you entered text without surrounung it in quotation marks''
Can anyone let me know what error I've made and how to fix it? It would be much appreciated. Thanks
Please Exuse the question I am about to ask. I am a bit rusty with Access and cant remember how to do the following. I have tried and tried to work it out and tried various help searches but cant get the answer I'm looking for.
What I need to do is create a data entry form, very simple! However I want the user to be prompted to enter a project name and number in order to find the project that i want the new data to be entered under. Then it will need to create a new record in that project ready for new data to be entered from the data entry form.
I am trying to build a query that would be pulled by indaviduals name entered by the user of the DB. I can't remember the santax to use in the critera field.
Hi all, I am a new user to Data Access Pages, I have no idea what I am doing. I have been reading some things through this form and have not found anything really of any use. So I am asking myself if anyone can help me. I have a database all ready created and I would like to change that into Data Access Pages. I have file save as my Form to Data Access Page, however when I look at it in webpage view the command buttons dont work. I have no idea what is going on with the code. could anyone help me please, thanks in advance.
I have a form, and on the form there is a Provider Rate which is a combo box, if the user select a zero rate, then it has the description please enter manual rate in box below. There is another box which the user can enter a manual rate.
how I can limit entry into these boxes, as currently a user can select a rate in the provider rate box and still enter something into the manual rate box. I want it so that if a rate other than zero has been selected in the provider rate box, then they can't enter anything into the manual rate cell.
I've made a form where the user can fill in a field ID... and than by clicking on a button another form will be opened with the data of that person (with that ID that's filled in). But if the user fill in an ID that is not currently in the database, there will be also shown another form, but than with no data.. Now I want that if the ID is not known, to display a message or something (like "this ID is not known, try again") and not to open the form..
I've used the following code under the button:
Private Sub openenFormulier_Click() On Error GoTo Err_openenFormulier_Click
Dim stDocName As String Dim stLinkCriteria As String
I am currently building a stock control system in access. I have a form with which the user selects a stock item from 3 combo boxes (stock name, stock weight and stock grade). The combo box links to a table of stock items. A stock item is made up of a name, weight and grade (all separate fields in the stock items table).
I wish to setup the form so as the user selects the stock name from the first combo box. Based on the value selected by the user, the appropriate stock weight(s) assoicated with that stock name will be displayed in another combo box.
Basically, I wish to take the result from one field in a form and apply its result to a query(?) in another field so as to filter(?) my result accordingly.