I have a database For customers of the company, when you open the main form through the search form , there are a filter . when you try to move between orders of this customer, there are a mssage (Asking you to approve of movement between the customer orders). to this point no problem, when you approval to move , cancel the filter on the main form with a stay at the current record (current customer).
hi, i have a search form, and when you double click on the record, it opens that record in my main form (which opens filtered)
this is fine because it displays the record that i want to see
however, when i try to perform other tasks on my main form, such as choosing the id from a combo box and finding that record, it wont work because the form is still filtered, one way to get around this is to open and close the form, but is there a way that i can implement something into my refresh button that removes a form filter.
Private Sub Refresh_Page_Click() On Error GoTo Err_Refresh_Page_Click
I have managed to link a report to a form where you can double click on the surname and the report opens automatically BUT I want the report to only show the data from the record that I have double clicked - at teh moment the report is coming up with thousands of pages - one for each record.
Can anyone help me with this - I think it's probably something simple but I can't work it out on my own :eek:
I have a form which displays records of our products, on that form I have now put a list box which displays the ancillaries to the products.
both the form and the list box run off queries.
I have the same unique identifiers in both queries.
I need to filter the listbox by the unique identifier every time I move record.
At the moment the list box stays populated with all the ancillaries, how do I filter it programatically to list only the ancillaries with the same unique identifiers as in the current record?
I have a problem with validation attached to a field or an entire record (displayed via a form) in that, if the user exits that field/record by moving to the next Access record, when the message comes up, it is this next record that is displayed, not the invalid one. This is confusing. My users usually use a filter when updating (sorry about the alliteration!) & this mostly displays just the one record out of thousands. When they remove or change the filter, the message is, as above, displayed over the wrong record. Ideally, I prefer the entire, quite complex record to be validated at one 'go' as many of the fields are interlinked. I have achieved this, sort of, with a button called Validate which the users are supposed to click when they have completed adding or updating a record. Most of the validation code is attached to this & it does keep them on the right record. However I can't make them click it. I have tried controlling the record displayed by making the record pointer go back one or forward one when an error is found but this causes problems with the first/last record in the table or filtered results. Each record has an unique number. I have tried storing this number & coding a filter to re-display it when an error is found but this is confusing when the users were not filtering to only one record. Also it only works once. If further errors are found, the application gives up.
I've built a basic inventory management system that allows a business to add products and the ingredients (and labour etc.) that go into them so they can work out costs and profit.We've run into a bit of a usability problem in the sense that they have 700 different ingredients and so adding them to products has become a little unwieldy as the lists in the comboboxs are massive.
What they've asked me to do is to add a filter combobox to the Ingredients subform of their New Product page that allows them to constrain the Ingredients by type, to make the lists more manageable. So if you imagine they are entering a record for a new cake and need to add Eggs as an ingredient they could either...
a) Scroll through the list of 700 ingredients as they do currently and find "Size 3 chicken egg".
...or...
b) Use a combobox on the ingredient row to pick "Eggs" which would in turn filter the ingredients combobox on that row from 700 ingredients down to a handful e.g."Size 1 chicken egg", "Size 2 chicken egg", "Size 3 chicken egg", "Size 1 duck egg" etc.
the filter combobox applies to all rows in the subform! Is there a clever way of telling the Filter to only apply itself to the current row of the continuous form?My code is...
Code: Private Sub FilterRMs() Dim mySql As String If Me.RMTypeFilter.Column(1) = "999" Then Me.FilterOn = False
My form has a button that has a calculated field on it (a dcount(...)). When the button is clicked, a couple of conditions are checked and if all is ok, it runs the vba code. If the tests fail, it returns to the form without running the code. All works correctly, except that the dcount number has disappeared. I finally figured out that it is now hidden behind the button. How do I bring it forward again programmatically?
is it possible to have a form page stay open for a time limit and then automatically close and open another form?
Reason I ask when a user clicks to open the database I want a splashscreen stating terms of use etc to stay open for a few seconds before it opens into the main database.
I have a table with fields for the year, dues, and a Boolean field that indicates whether or not its record is the current year record.
I have a form based on the table that is used to update the table.
My business rule is that only one record can have the "current year" field checked.
I am working with the Form_Before_Update event. What I would like to happen is if the person selects the "current year" check box and if there is already another record with its check box selected, my code will realize that the user has selected a second record and undo the check box and cancel the event.
Question: Looking for code that would check for the second record being checked and back out the user's check for that record?
Note: I have to account for not only the user clicking the record selector to try and save the record, but also the case where they check the box, then click on the "close form" button that I created.
i've designed a rental database (which seems to do what i want) - it's not perfect....
But i can't figure out how to accomplish this.
If i have a tenant, who has previously had a lease agreement on one of my properties, but then moves out, and then moves into one of my new properties, i can't seem to see how to get access to display just the new lease details.
I've attached a blank copy of the DB with some sample data to illustrate this.
you will see that test tenant has two leases, one expired lease, and one active lease, but on the main form it just shows the expired (original lease)....
When I run this code to delete the form's current record, the Me.Requery throws error #3167 (Record is deleted) and leaves "#Deleted" in all of the fields.
Private Sub DeleteProfessional_Click() Dim MyDatabase As Database Dim rstProfessionals As DAO.Recordset Set rstProfessionals = Form_Professional.RecordsetClone If (rstProfessionals.RecordCount = 0) Then MsgBox ("There are no Professionals to delete!")
I have searched the forms and I see codes to apply filters to a button, but can someone tell me what is the code to remove all filters on the current form? I know I can always hit the filter on/off button at the top but im trying to keep users from having to leave the current database form. THANKS IN ADVANCE!
I am new to Access. I am using Access 2010. I have searched and found several articles on emailing the current record shown on a form but haven't been able to get any of them to work.
My goal is to have a user input information onto the form and then have one button the user will click that will save the current record, email the current record in pdf, and then close the form.
The form name is: frmCorrectiveActions. The unique identifier for a record is: Corrective Action ID.
The last coding I tried is below. I know something is wrong but have copied this code from another post about emailing forms so I'm not even sure what half of it means.
I am getting the message Run-time error '3075': Syntax error (missing operator) in query expression "Corrective Actions ID = 23' and when I hit debug this is highlighted: qry.SQL = strSQL
form Private Sub Email_Click() Dim qry As DAO.QueryDef Dim strSQL As String Dim ReportQueryName As String ReportQueryName = "qryCorrectiveActions" Set qry = CurrentDb.QueryDefs(ReportQueryName)
two tables: Addresses, Instructions One form_one subform: User form
The user form contains set of instructions for each company that we take care off, the sub-form has all of the addresses for the company, these come from the "Address" table, the two are linked via a field called "companyID" so the subform only displays the addresses for the current company being viewed on the form.
The problem is, on the subform there is a dropdown box called "administrator" and this is used to select the person who is looking after the company. Some of the companies have hundreds of addresses, so when i click the next record button on the subform I have to fill in the administrator again for every address for the same company. Is there a way using vba or a simple function to auto update all of the "administrator" dropdown boxes for that company based on the administrator I select for the first address.
I have made a navigation form that prints the current record out as a PDF and also the option to send the current record by email as a PDF. Both work perfect when you open the form outside the navigation form. But when you open it inside the navigation form, it does not print any of the information.
The problem is in the Query report, In the criteria box for field [RequsetID] it has
Currently, I have a database situation in which I am working in one database with data. If this data does not belong in this database I need to be able to take specific fields from the record and insert it into either a new table in a different database I have, or have it copied to a blank form that would accept it.
I have a form which contains a subform. On this subform, the user will enter several lines of container ID numbers. If one of these containers has errors, they check a yes/no box and a pop up form opens for them to enter the details of the errors.
I want two fields that are populated on the subform to transfer information to the corresponding two fields on the pop up form. This works when only one container ID has been added to the subform. However, when there are multiple containers in the subform and the container with the errors happens to be the second or third record on the subform, the pop up form always transfers the information from the first record to those fields.
I also have the subform requerying when the check box is checked so that the information saves to the table and the focus does stay on the correct record but the pop up form still opens with the wrong information.
how to transfer the information from the record that the user is currently on?
I have created a navigation form with quick access to the forms and reports I use most often. The Navigation Form (which I named Control Panel) automatically lands on the Tutor_Information Form on a current record. However, I would like for it to open to a blank form instead while retaining the ability to access the current records. Individually, when opening the Tutor_Information Form from the Navigation Panel, it opens to a blank record.
I used a 2 step macro
1. OpenForm 2. GoToRecord - New.
How can I make it do the same thing when landing on the Navigation Form (Control Panel)? I am using Access 2013.
I would like to be able to switch between these two forms and the form automatically set focus to the record that I was on the form prior. Meaning if I am on record 3 on Form A and navigate to Form B, I would like to automatically set focus to record 3. Is this possible?
A possible issue after this gets sorted out is what happens if with the same scenario above record 3 does not exits? is it possible in that instance to simply requery the form?
I have a Main form that has button that loads a new Pop Up form for entering new data that will display in the Main form. When all the data is entered I click on a button that Saves the data and exits the form and then runs Re-query on the main form returning to the record that was current before the requery.
I have the following code:
Private Sub cmdSaveTradeAndExit_Click() DoCmd.RunCommand acCmdSaveRecord 'Save the current record DoCmd.Close 'Close the current form Dim CrId As Integer CrId = Forms!frmTransactionMainActivePopUp.CurrentRecord Forms!frmTransactionMainActivePopUp.Requery DoCmd.GoToRecord , Forms!frmTransactionMainActivePopUp, acGoTo, CrId End Sub
But I am getting the following error:
Run-time error '2498':
An expression you entered is the wrong data type for one of the arguments