Forms :: Sort Continuous Form By Two Fields?

Jul 6, 2013

I have a form I would like to sort by:

first - by App_Flag (a yes/no field) - have all the clients with "yes" on top

second - by App_Date - from the earliest to the latest

The query sorts it fine but the form does not - even if I requery the form (added a requery button).

Can a macro or coding make it sort it the way I need it?

View Replies


ADVERTISEMENT

Sort Continuous Form By Two Fields

Jun 25, 2006

Is it possible to sort a continuous form by two fields?

ie. If two records have the same value in one field, look at the second field to see which one is displayed first.

I was thinking that it might help to combine the two text boxes into one (a not visible text box) and sort it by that, but I don't know how to sort by an unbound, not visible text box either...

Any suggestions?
cheers, joe

View 1 Replies View Related

Modules & VBA :: Sort Continuous Form On Two Fields

Jul 20, 2015

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")

[Code] ....

View 10 Replies View Related

Forms :: Use Buttons On A Form To Change Sort Order On A Continuous Form

Jul 23, 2013

I want to use buttons on a form to change the sort order on a continuous form. In the buttons click event I am using a public function (named Sort_1) to change the sort order. The first element of the event call is the name of a generic query (named Sort_1_Query1) and the query field to sort (LAST_NAME OR FRIST_NAME, depending on the button.)This is the Click Statement.

=Sort_1("Sort_1_Query1","LAST_NAME")

This is the Public Function
Public Function Sort_1(SortName As String, FieldName1 As String)
DoCmd.ApplyFilter SortName, FieldName1 & "between 'A' and 'Z'"
End Function

I think the problem is in the use of quotation marks or trying to pass the query field name to the Do Command or the use of an ampersand.

View 4 Replies View Related

Forms :: Continuous Forms - Looping Through Records / Manipulating Fields On Form

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

Modules & VBA :: Sort Ascending And Descending And Filter Continuous Form

Mar 6, 2015

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

[Code] ....

View 8 Replies View Related

Accessing Fields In Continuous Forms

Feb 8, 2006

Hi Guys,

I currently have a subform which relates to the primary key of the main form.

This subform contains possible 'Answers' which related back the main form/table 'Question'. Each possible answer has a true of false field to show whether or not it is the correct possible answer from the question field.

Currently the subform performs correctly, in that it shows up the 3 possible answers for each question... (in continuous form view)ie all three appear at once in 'form view' - but in the subform the only one answer and one true or false attribute appear at once.

Here is where the problem is - i need to be able to access the individual field values for these 3possible answers (in VB code). I cant work out how to do this? Does anyone know how access calls them? What will the checkboxname be? The problem is because there is only one checkbox on the form in 'Design View' (to see if the answer is the correct one), but then 3 in 'Form View', I cant work out how access distinguishes between them.

Many thanks

Ross

View 2 Replies View Related

Forms :: Sort Alphanumeric Fields Where Number Of Digits Not Always Same

Mar 13, 2013

I want to know if there's a way to sort alphanumeric fields where the number of digits aren't always the same.

Example: I have the following: 2a, 10a, 3a.

Currently, it sorts: 10a, 2a, 3a.

Is there a way to get it to sort 2a, 3a, 10a without adding a 0 before 2a and 3a?

View 5 Replies View Related

Sort By Three Fields And Display In Form

Aug 2, 2005

Hello folks,

There must be an easy answer to this! I have searched the forums but have not found what I need to make this work the way I want it to. I have a three part reference field. The records in the form are supposed to be sorted into ascending order Field1 first, then Field2 and finally Field3. The forms RecordSource is a query that brings through the relevant fields from my table. I have the query sorted according to these three fields so that every time I open the database it sorts the way I want it to. What I want to do is have a button that will sort the records into the correct order when the buttion is clicked. I am sure this can be done, but cannot get it to work on more than one field at a time! Any help/ideas would be greatly appreciatted.

Thanks

View 1 Replies View Related

Sort Multiple Fields In A Split Form

Apr 30, 2014

I have a split form with 10-15 fields. Each of these fields is a combo box. The trouble I am having is sorting the data in the datasheet of the split for. I want to sort ascending by "ProductTypeName", then ascending by "Parent SKU" and then ascending by "ProductSizeID".

How can I do this when each of my combo boxes have an ID and then a name? Example below:

ProductTypeID
ProductTypeName

1
Apron - Bib

2
Apron - Waist

3
Bag - Backpack

4
Chef Coat

[Code] ......

View 3 Replies View Related

Forms :: Sorting Multiple Fields On A Continuous Subform

Feb 10, 2015

I'm trying to use the following code to programmatically sort four fields on the continous subform:

Code:
Me.SPlanChange_03_OFFSET.Form.OrderBy = "AOBJ ASC, ORG ASC, AVAILABLE DESC, AGFND ASC"
Me.SPlanChange_03_OFFSET.Form.OrderByOn = True

It appears that the code works partially - the values in the "AOBJ" field are as they be and so are the values in "AVAILABLE" field. The values in the "ORG" and "AGFND" fields will not sort.

Is what I'm trying to do even possible?

View 1 Replies View Related

Forms :: Calculated Fields In Continuous Forms

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

Locking Fields For One Record On A Continuous Form

Jul 22, 2005

How can i apply the following code to the immediate record in my subform. I would like when the assigned check box value = true, then the fields for that record become locked.

Ive written the following code to an onclick event for a check box labeled "assigned" on my form, the problem is it executes on all the records in my form.

Q. How do i apply the code to only the immediate record?


Private Sub Assigned_Click()
If Me.Assigned.Value = True Then
Me.Serial_Number.Enabled = False
Me.Component_Group_ID.Enabled = False
Me.TypeID.Enabled = False
Me.Description.Enabled = False
Me.Status.Enabled = False

Else
Me.Serial_Number.Enabled = True
Me.Component_Group_ID.Enabled = True
Me.TypeID.Enabled = True
Me.Description.Enabled = True
Me.Status.Enabled = True

End If

End Sub

View 3 Replies View Related

Populate Unbound Fields On A Continuous Form

Oct 5, 2004

Can I populate unbound fields on a continious form, if it is possible would you give me some code to look at or direct me to an article

Phil

View 2 Replies View Related

Forms :: Hide Number Fields Of Specific Record On Continuous Subforms

Mar 8, 2014

I have a continuous subform recording the information of various wireless products for an employee embedded in an employee main form. Please see screen shot enclosed.

There is a check box "BYOD/Personal" on the subform. I want to hide a number fields when this check box on independent record is checked. However, if I use the following codes, the changes apply to all records under that employee.

Private Sub BYOD/Personal_AfterUpdate()

If BYOD/Personal.Value = True then
Me.Provider.Enabled = False
Me.XXX.Enabled = False....etc.
Else
Me.Provider.Enabled = True
Me.XXX.Enabled = True....etc.
End If
End Sub

How can I just disable those fields on the subform of a specific record when the BYOD/Personal field for that record is checked?

View 8 Replies View Related

Queries :: Open A Query Based On Two Or More Fields Of A Continuous Form

Nov 22, 2013

I have a subform which is a continuous form displaying a single combobox of trade names so there may be up to 4 or 5.i want to click on a button on the main form which will open a form based on a query that will display all personnel matching all or 1 of the trades in the subform?

View 2 Replies View Related

Modules & VBA :: Populate Word Fields From Access Continuous Form

Jun 3, 2015

I have a form that I have exported certain fields into a word doc (it is up and running just fine). I created bookmarks in word and put some VBA into my access form, so when I click on 'Create word report' it pops up and automatically populates the record I am on. Here is the tough question,

How to make this work with a continuous form? My main form has several subforms, one being a continuous form. The main form shows one bridge at a time. The sub continuous form shows information for all of the bridges spans (could be anywhere from 1 to 9).

View 4 Replies View Related

Forms :: Applying Sort And Filter In Form Results In Design Changes To Form

Dec 27, 2014

When I'm applying a sort and filter in a form, Access is updating the Filter and Order By properties of the form, so that it is possible to re-use in conjunction with Filter on Load and Order By on Load properties. However, a consequence of this is that when the form is closed, it prompts the user whether they want to save the design of the form. I want to circumvent this as I don't want to re-use the sort and filter and I don't want to be prompted to save the design of the form.

Although I can circumvent this by closing the form using a method that doesn't prompt for saving, the additional complication here is that the form in question is in the Navigation subform of a Navigation Control. Hence when I click on a another Navigation button, it (not me) closes my current form and hence prompts me whether I want to save the design of the form (if I have been sorting and/or filtering). I can't see how to circumvent this and the prompting is resulting in unacceptable usability.

View 2 Replies View Related

Forms :: Sort Form From List Box

Apr 14, 2015

I have a form named "frmItems" with a list box in it called "lstItems"

I would like to create a find (or search) button for it, but how? I also have a search box called "txtSearchI" ...

View 14 Replies View Related

Forms :: Dates Won't Sort In A Form

Sep 23, 2013

I have a "Date Select" form that is linked directly to a table that only has one column in it, "Dates". The column in the table is a Date/Time column and is sorted in date order, Lowest to Highest, and when any new dates are added to the table (through another form) they re-sort into date order.

The "Date Select" form allows the user to highlight a date and open a record containing information logged against that date, however the dates on the "Date Select" form will not sort into the logical date order that the table that feeds it is in!

I've set the "Date Select" form Property "Order By" to [Datse_List DESC], (Dates_List being the name of the List Box on the form that displays the list of dates from the table), and set the "Order By On Load" to "Yes", but still the dates in the list box remain out of order.

Dates are entered into the table "Dates" column retrospectively / randomly.

how to make the dates in the list box conform to Lowest to Highest?

View 5 Replies View Related

Forms :: Continuous Form With Command Button On Each Record To Open Another Form

Jul 30, 2014

I have a continuous form in which I put a command button for each record called "detail". I would like to click on the "detail" button and make it open another form containing all (and only) the info on this record.

At first I refused to use an "id" to link both forms, but finally I added the "id" in the table... however still does not work.

continuous form: "04 - GASTOS_BUSQUEDA"
id field on continuous form: "Gastid"

pop-up (details) form: "GASTOS_EDITAR"
id on pop-up (details) form: "editar_id"

This is what I have tried on the "click" properties of the "details" button field (called "btn_editgs"):

1)
DoCmd.OpenForm "GASTOS_EDITAR", acNormal, , "[editar_id] = " & Me.Gastid

2)
DoCmd.OpenForm "GASTOS_EDITAR", , , "[editar_id]=" & Me.Gastid

3)
stLinkCriteria = "[editar_id]=" & Me![Gastid]
DoCmd.OpenForm "GASTOS_EDITAR", , , stLinkCriteria

4)
Private Sub btn_editgs_Click()
On Error GoTo btn_editgs_Click_Err
Dim strWhere As String
strWhere = "[editar_id] = " & Me.Gastid
DoCmd.OpenForm "GASTOS_EDITAR", , , strWhere
btn_editgs_Click_Exit:
Exit Sub
btn_editgs_Click_Err:
MsgBox Error$
Resume btn_editgs_Click_Exit
End Sub

View 9 Replies View Related

Forms :: How To Sort Query Results With A Form

Aug 14, 2013

Essentially I have a table for rooms around my school and what the rooms contain. Most of the details for the rooms are Boolean (e.g. If the room has a projector, Yes/No).

So what I am trying to do is have a form where i can select a checkbox(s) and if i tick one, a query that holds all the room details will only show rooms with projectors in them, which i can then display those results in another form.

My question is how do I get the check boxes in the form to narrow down the room results to only show the ones with the criteria i have selected in the form?

View 1 Replies View Related

Forms :: Continuous Form - Click On ID To Populate Single Form

Oct 4, 2013

I have a continuous form that displays all my customers .I want to be able to dble click a customers ID and go to there customer details form.

View 14 Replies View Related

Forms :: Linking Form To Subform Set To Continuous Form View

Aug 22, 2014

How to populate the parent form's PK to multiple records in a child subform set to a default view continuous form?

In other words, how to auto populate the primary key to multiple records displayed the subform?

View 5 Replies View Related

Forms :: Using IIF Statement On A Continuous Form

Jul 19, 2013

I have a continuous form sfrmAddress which is based on my table tblAddressList. What I am trying to achieve concerns the date fields DateFrom and DateTo.

DateFrom is a bound text box txtDateFrom

I am trying to put an IIf function in the Control Source of unbound text box txtDateTo

=IIf([txtDateFrom]=[qryAddressHistory1]![LatestFromDate],Date(),[tblAddressList]![DateTo])

qryAddressHistory1 returns the LatestFromDate , so the most recent address.

The idea being if it is their most recent address, they have lived there until today, if it is not their most recent address it will display the date contained in the table (when they moved out or DateTo).

I have tried this a few different ways, double and triple checked my references and I'm usually OK with IIf so I don't understand where it's going wrong!

I should add I'm getting the #Name? error all the way down the column when I open the form.

View 3 Replies View Related

Forms :: Continuous Form With Query

Apr 5, 2014

I have the following code that is intended to use the three fields obtained from a record on a continuous form and display the details of the record on a single form. I have not used the findfirst method because I am having enormous problems with it. Instead I am defining a query based on the recordsource of the continuous form. This sql query gives one record as result and that record is to be used as recordsource by the single form.

Code:
Public Sub SboxSelectForm(ForName, ParName, QryName)
On Error GoTo NotFound
Debug.Print "SelectForm ForName="; ForName; " ParName="; ParName; " QryName="; QryName
Dim ResultQy As String, F As Form, P As Form
Dim db As DAO.Database
Dim Prsc As DAO.Recordset, Frsc As DAO.Recordset

[code]....

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved