I'm displaying records in a subform that is in the datasheet format.I would like a sort button on my main form so that I can click a column header, press this button and it can sort the datasheet ascending.
i have a form with subform in it, and when i press the save button in the main form it saves only the records in it but it wont save the records in the subform
i found on microsoft this code DoCmd.Save acForm, "New Employees Form"
how can i use it to save both the main form and subform together
For school I have to make a application in access how to delete a selected record in the table in a subform by using a button. The subform is in the main form and the button is also in the main form
I have a mainform with a combobox and a button. What i want is when i click on the combobox and then on the button I want that the textbox in the subform automatically fill in.
The mainform name is FrmTakenInvoerenEnToewijzenAanEenMonteur,
I have a very simple form that details loan machines for customers.
What I need is a very obvious sign on each record to see if the machine is in our stock or not.
A normal check box is an ovious answer but they are too small and my users complain (bigger glasses were an option :) ).
Ideally a toggle button or something that the user can click and it will change colour maybe between Green and Red (Please see attached screen shot) Green for in stock and red for out on loan. Any ideas or suggestions would be fantastic.
This is my very first post on this forum. I started to work with Acces and SQL only two weeks ago, so my questions probably are newbie-stuff, but please bare with me and please help me anyway :-)
In my form I've inserted a list that shows data from one of my tables. The posts are ordered by 'ID' (and I know how to change this). But I want to make a button just right of it, that, when it's clicked, sorts the list by 'first name' instead.
Hi, I need help with listbox problem: I made a listbox contains peoples name from A to Z. I want to sort it via A to Z button press. It's similar with customer phone list form in Northwind.mdb sample, due to my limited knowledge, I can't replicate it using listbox.
I created a button for a form using a built-in macro function for sorting records, and I am returned with the following error: THE COMMAND OR ACTION 'SortAScending' ISN'T AVAILABLE NOW.
Ive created a form and one of the fields is a field called "Due Date"
I want to create a button that once pressed will sort the records in order of due date with the oldest being record 1.
How I can get a button to manipulate fields.
Ive got a set of buttons at the bottom of my form (Ive placed them in the footer) that were set up using Access automatically. They go to first, last, next and previous records. Ive also set up two extra, one that creates a new record and another that sets the record.
The thing is that the set record button I would actually like it to take the data in a field called "Frequency", add a random number to it and then set the record.
I have a Listbox that I use to find records in the Database. It has two fields, [ShootID] and [ShootDate]. It is curently sorted in the query by [ShootID] but I want the user to be able to change it to sort by [ShootDate] and then back again.
I created my first RDB input form and it works fine. In the subform new records are created at the bottom row. The subform has a date field. The main and sub forms are based on tables.
When I open the input form I would like to see the subform records sorted by the date field but I don't know where to look for help on that. Can somebody point me in the right direction?
I am including my form in design layout just in case it will help.
I have a subform embedded in a mainform which contains loan payment details over a number of months. The record starts with the payment period number ie 1,2,3 etc. The problem is that every now and again the subform changes the display order of the records so that I get 4,5,6,1,2,3.
When I look at the underlying table the order is OK as is the non embedded sub form. I cannot see any reason for the change and it only happens randomly (apparently).
The numbers are not autonumbering but manually input. Hope someone can help please.
Does anyone know how to sort subform records by clicking column headers. I know there is one way by select column and click A->Z button from toolbar. Is there other way to do so? I know there are same kind of posting, but they couldn't solve my problem.
I have a form which shows training events - these can take place over one or several days, and can be run by one trainer or several, so I have my basic Events Info in one table (EventID, EventType, Location, that kind of thing) and the 'Jobs' in a separate table (EventID, JobDate, TrainerID, etc)
The problem I'm having is that I want the List of Events to be sorted in order of their start date... which is on the subform, not the main form.
How can I go about it - and still leave both the main and subforms fully editable?
I have a form that shows multiple rows of linked/child records.The form in question is the "frmFilterNumberTypeView" form. When a particular filter is used (installed on an automobile), I would like to be able to click on the corresponding "Installed 1" button left of the filter number, so that by code, I can reduce the Qty on Hand by One, and insert the corresponding filter ID to the History table, along with the date/time the filter was used.
how to reduce the Qty on Hand, nor how to do the updates to the History table, I'll figure that out myself over the next week or two (hopefully it won't take that long). What I'm trying to figure out here is how I can associate the red "Installed 1" button with the filter to the right of whichever button I press.
how to sort the filter column on this same form. I'm fairly certain that this would be very easy to do if the subform in question was populated by means of a corresponding query, but I'm afraid that if I go that route that I'll spend another 20+ hours trying to figure out how to get the proper filter records to match the filter manufacturer, not to mention having to next figure out how to link the table so that if I modify any particular filter record, that I'll be able to have the associated table update accordingly.
Is it possible to sort the filter column without the subform record source being a query?
I have developed a database but have had difficulty with sorting data within subform of a main form. The subform displays the related tasks that correspond with main form that has been selected. Within the main form I have also created a text field that defines a particular sorting sequence of the tasks found within the subform which is titled Task Sequence. What I would like to do, is use the Task Sequence field to sort the order of tasks within subform. I have tried: IIf([ID] Is Null, 0, Val([Task Sequence])) within the Advanced filter/sort but either it shows only the first task defined in the Task Sequence or it wants to filter the main form and not the subform.
I use the following xml to create a ribbon for Sort and Filter
Code:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon startFromScratch="true"> <tabs> <tab idMso="TabCreate" visible="false" /> <tab id="dbSearchtab" label="Sort and Filter" visible="true"> <group id="SearchScreenSort" label="Sort and Filter">
[code]....
The first problem is that this ribbon appears in forms where it is not included.The second problem is that in addition to the "File and Filter" tab, there appears a "File" tab Whe you click on it is goes backstage allowing you to Print and Exit.
I'm using a dropdown that has the months of the year in it. The user selects a month and the form is then filtered by a date if its the first of whatever month is selected. It works fine but when the filter is applied I cant select the little arrow on the column headings and select the boxes (Select All, Blank, ETC...). It doesn't work on any column, just the apply text filter works but I cant select anything.
It works fine when I clear out the filters on the form. I tried to use vba to set the menusetting property to true and that didn't work either.
I am using the following by Allen Browne to sort one field. But now I need to sort on two fields.
Code: Function SortForm(frm As Form, ByVal sOrderBy As String) As Boolean On Error GoTo Err_SortForm 'Provided by Allen Browne 'Purpose: Set a form's OrderBy to the string. Reverse if already set. 'Return: True if success. 'Usage: Command button above a column in a continuous form: ' Call SortForm(Me, "MyField")
Can't find any way to declare variables in the sort of module that Access uses by default.Having changed the default, I now get 'Option Compare Database' as the first line (previously nothing was there). Adding anything at all in that section, or changing it to 'Option Explicit' has the consistent effect that all the procedure names in the module are not recognised and nothing works.
Variables declared in procedures work only in the procedure even if declared as Public. Can't get a Static variable to work in more than one procedure. However many variables I declare, there are never any in the Declarations list at the top of the Code Window.
I'm trying to sort and filter a continuous form. Sort ascending and filters works perfectly fine. But my descending button doesn't work. I basically have a combo box which contains a field list. Then two buttons (asc. and desc.), then a text box for filter, a button to filter, and another button to reset filter. Here's my code:
Code: Private Sub cmdAscending_Click() If IsNull(Me.cboField) Then MsgBox "Please choose a field.", vbOKOnly, "No field to sort." Else Me.OrderBy = Me.cboField Me.OrderByOn = True
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?