Forms :: Open Query Based Report On Form With Matching Record
Nov 25, 2013
This is my data:
Table: "Facility Info"
Data in the table: "facility", "city", "date", etc.
Query: "Q Facility"
Report: "R Facility"
Form: "Main Form" is where the data is entered that goes into the "Facility Info" table.
In the "Main Form" there is a dropdown box where I can select the "facility".I would like to add a button to this form that opens my report "R Facility". But this report is a collection of all the facilities and I would like it to just report the ones for the facility that I selected from the dropdown box on my "Main Form".
View Replies
ADVERTISEMENT
Nov 2, 2014
I have a bit of code that upon a button click will check to see how many records match (CustomerID); if there are no records returned it goes to another action (works fine), and if there is a record returned, it opens another form to that record (again, works fine).
However, should there be more than one record, how do I get it to open the first one?
The code to open the form is
Code:
DoCmd.OpenForm "PublicComplaintsMain", , , "CustomerID='" & varInput & "'"
Once the form is open, what code would I use for a command button to find/goto next matching record (as I haven't used .FindRecord in the first instance, .FindNext won't work - or will it?)
View 1 Replies
View Related
Sep 18, 2012
My situation is that the access form field name is "Number" , there is a folder named "member" in
desktop C:UsersTomDesktop
For example If i press the command button (Field name "Number" is 123) in form , then automatic open named "123" folder inside named "member" folder
What is the Command button Code ?
View 4 Replies
View Related
Feb 9, 2006
I have two forms in my database. One for equipment and one for the network information.I want to open the frmIP from the frmEquip and be on the coresponding record by matching the NIC Mac address field.Currently, I can do it but it is done by a filter...I don't want a filter...I just want to open to that record but be able to access the rest of the table without turning off the filter.Here is my code:Private Sub cmdOpenIPForm_Click()On Error GoTo Err_cmdOpenIPForm_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmIP" stLinkCriteria = "[NIC_MAC]=" & "'" & Me![NIC_MAC] & "'" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_cmdOpenIPForm_Click: Exit SubHow can I open the form and goto the record with the matching NIC_MAC (without a filter)?Thanks for the assistance, Jeff.
View 2 Replies
View Related
Oct 21, 2005
I have four similar forms - they each have a list box and an "edit" button.
The user selects the item in the list box and clicks edit.
Another form pops up, open to the record that was selected in the list box.
This works in two forms, it doesn't work in the other two forms. Instead it pops up the first record in the table, regardless of what is selected in the list box.
The code is identical on all four "edit buttons." (with field names changed, of course.)
Code:Dim stDocName As StringDim stLinkCriteria As StringstDocName = "frmCaseTypeEdit"stLinkCriteria = "[Case_Type_ID]="&Me![listCaseTypes]DoCmd.OpenForm stDocName, , , stLinkCriteria
The properties in the listboxes are also the same on all four forms - based on a query, 3 columns, and bound column is the first one (which is the ID field).
Does anyone have any ideas what could cause this?
View 3 Replies
View Related
Jun 7, 2007
I have 2 forms.
The first form is called "entry"
the second for is called "play"
I am trying to open the play form on the click of a button so that it displays the records matching the value set for the [playid] field in both forms.
Can anyone help me with the code?
View 4 Replies
View Related
Jan 29, 2014
I am struggling to pull out a report based on the combo box selection. I have NOI database and want to pull out a report for a specific customer that how many NOIs are generated by this customer..
I have a separate table of customer and another table of NCRs and the customer information comes from customer table.
I have tried the below statement but gives me an error message:
code for Macro that pulls the report in click event:
[CustomerName]=[forms]![CustName]![combocust1]
do i need to mention the report as well in some where in report ?
View 14 Replies
View Related
May 13, 2013
I have an access form of locations to manage (that are labelled Loc-01, Loc-02, Loc-03) and I'd like a label that automatically shows which record is currently open (rather than a text box). Is this possible? Or if that's not possible, I don't want the textbox to be editable in the form.
View 2 Replies
View Related
Oct 2, 2013
I have been an MS Excel man all along my career and I am a novice in MS Access.I have created a table, [Initial Customer Approval] which records data from a Form, [Initial Customer Approval]. Once the data is entered in the Form, I need to do some calculations based on the data entered in some of the fields in the form.I created 6 different queries for the six possible values in those fields. now for each of those queries I created respective reports.I placed a Print command button in the Form.
1. When I press the Print button it should open the report for the current record in the Form. (Currently It Opens all the reports simulatneously, with only one relevant report containing the current record; other opened reports being blank.)
2. If user presses the Print button before pressing Save button then system should prompt user.
Here is the code (Please note [reference number] is the unique ID generated for each record entered in the tabe through form):
Private bSaveClicked As Boolean
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not bSaveClicked Then
MsgBox "You are trying to navigate away from the active record. Please either save your changes, or press ESC to cancel your changes.", vbOKOnly + vbInformation
Cancel = True
[code]...
View 5 Replies
View Related
Dec 5, 2013
I created a query that shows everyone who has a specific date field blank. Now want to make those names clickable so that it opens a specific form with a certain record related to that individual in the query. Each line with a different individual should open a different person on the form and their corresponding record.
View 3 Replies
View Related
Apr 14, 2015
I am trying to open a report (rptGMX-IRG) that includes a sub-report (srptRG) based on criteria that is set with two unbound fields on a form (frmGMXbook). This form has two dropdown boxes (cboGMX_No & cboMachSize) and a command button. The first dropdown box includes data located in the main form and the second dropdown includes data that is part of the sub-report.
I can get the report to open properly when I enter data into both fields on frmGMXbook.
However, the problem I am having is the inability to have one or both fields be "Like '*'" and show all associated records.
Here is the code I have on the command button.
Private Sub GMX_Preview_Click()
Dim strCriteria As String
If IsNull(Me.cboGMX_No) Then
strCriteria = "[cboGMX_No] Like '*'"
Else
strCriteria = "[GMX_No] ='" & Me.cboGMX_No.Value & "'"
[Code] ....
View 1 Replies
View Related
May 12, 2015
I am creating a database to store patient ultrasound reports in a clinic. The form I've designed contains a single patient's report with various values and measurements. I need a button on that form that opens a report showing ONLY THAT PATIENT'S data.
So, for example, if I've opened the form (AbdomenForm) on patient with ID 4, when I press this button, it should open the report showing only patient ID 4's data.
I can get it to work manually by creating a query (AbdomenQuery) that contains 4 in the criteria for ID (my table's primary key). Then I made a report (AbdomenReport) that uses AbdomenQuery as its data source and everything turns out well.
Now, how do I go about making a button on the form so that when patient ID 5 is open, that button opens the report for only patient ID 5? What code should I use and where should I put it?
View 3 Replies
View Related
May 22, 2014
My problem is that I am trying to update a field (called 'Sold' which is a yes/no checkbox column) for a specific record whenever an event is triggered. I have two forms (derived from two tables), one is called frmInventory and the other is called frmSales. In frmSales, I made a combo box called 'cboItemID' that allows the user to select from a list of items from my inventory table. Each selection from the list has 4 properties, the first of which is the 'Item ID' from the inventory table. Lastly, I have a field in both frmSales and frmInventory called 'Sold' as mentioned above. What I want to do is that whenever I check/uncheck the box in the 'Sold' field in frmSales, I want the 'Sold' field in frmInventory to check/uncheck as well, but only in the record with an 'Item ID' that matches the 'Item ID' from the combo box selection. In other words, I want to match the 'Sold' field in frmInventory with the 'Sold' field in frmSales, but for only the record that has the same 'Item ID' primary key as the one I picked from my selection in the combo box from frmSales.
how to reference another table and check whether or not it's 'Item ID' primary key is identical to the one I specified from the combo box, and then take action to update the 'Sold' field if the IDs match.
View 1 Replies
View Related
Jun 9, 2010
I have two tables and two separate forms. [ID] is the link between them. (I cannot do a subform in this case).
Form1 displays 3 records
Have control button that goes to Form2 where [id] = NumID (NumID is "long" variable)
Have control button on Form2 to go back to Form1. It needs to go to the same record it came from. I don't want use a where clause (e.g., where [id] = [id]). This works, but the form1 is now filtered. I need all records available in Form1, but I want to go to the record it was on when the button was clicked to go to form1
Example:
Form1, record1, ID=30
Form1,record2,ID = 35
Form1,record3,ID = 40
Select record3,ID=40, then click on button to go to form2 (has where clause where ID=40).
Form2 is filtered and is correct.
Click on button to go back to form1. No Filter. It goes to 1st record (record1,ID=30). I need all records displayed, but need to be on record2,ID=35.
View 4 Replies
View Related
Jun 16, 2005
I hae a button on my form to open a report. However, I get all the records in the database when I only want to see the report with the current record from the form on it. How do I narrow my report?
View 9 Replies
View Related
Jun 21, 2013
i want to open a report but only showing the result of one record in a sub form,
i have a field that is on all rows of the subform,[click to run] and what i want the user to be able to do is double click on this field and it will open the report with only the record information for that row displayed.
View 1 Replies
View Related
Dec 10, 2014
Create form to search multiple fields in table
Return records that match search
Open the record that you want in Form View for editing
View 1 Replies
View Related
Mar 20, 2013
I have a report that gets its data from a query. I need the query to run before the report based on criteria based from two combo boxes on a form.
View 3 Replies
View Related
Mar 26, 2013
Basically I have a Customer Form, which I have a New party button on it,this button opens up the party form to a new party, what I would like it to do is open up a new party but make the new party for the customer I had selected in the previous form.I have tried the GoTo macro's but cannot seem to get it to work.
I am thinking on clicking the button it will need to get the Customer ID, and then open the party form, create new party, and paste in the Customer ID, which then updates the Name - Date - Address - Company Fields.
View 5 Replies
View Related
Apr 9, 2015
I'm working on a database for residents at a care home. I've just started and I want to automate a process where I can click a button and see the contact details of a GP. It's all working but I want it to be that if the resident has no GP it will open a form so you can choose a GP. I have a message box to tell the that the resident has no GP and it takes them to the relevant form but I need it to be based on the correct residents ID and it is not. I have the code running on form load. I have attached a zipped version of the database (it is safe I promise)
View 5 Replies
View Related
Jun 6, 2013
I have one table containing name of restaurant with its address etc. Then i created another table to list out the restaurant workers names and details. Just as an example,
Table:Restaurant
Restaurant name
Address line 1
Address line 2
Restaurant #
Website
Table:StaffContact
Staff Role
Name
speciality
email
phone
I have the main form that has all the restaurant details only. And i have another form containing the Staff information. Please note the two table have a relation and it works well.
Now to make it user friendly(basically easier for the lazy ones), I dragged the staff contact form on to my main form and displayed it as a datasheet(basically a sub form).
Now, my boss does not want users to add/delete on this sub form(datasheet). So,he wants me to create buttons to open new record of staff for each restaurant(new form)
My issue is with opening a new record to enter a new person to the staff list and give them a role as well in form view.The new form has
So i ran a Macro, with open form with Where condition
Code:
[Staffcontact]![Rest Name]=[Forms]![MainForm]![RestaurantName]
But, it does not work .
View 2 Replies
View Related
Aug 25, 2011
I have a subform in which I want to put in a Command Button to open another form.
I used the wizard as per normal, but when you come to matching specific data fields, there is nothing in my left hand column of the sub form. I have checked the record source property and it is bound to the correct table.
I have read that this is an issue with Access 2007? Is this the case or am I missing something obvious here?
View 3 Replies
View Related
May 28, 2013
I have a database (I've attached it for you). I'd like to set it up so that in the "incentive scheme" form when the field [term 1 allow] is changed and is more than 0 then have the form "permissible explanation" appear with that record so the user can add an explanation, they should not be allowed to leave it empty if the [term 1 allow] is still >0 and then save and return to the "incentive scheme" form for further input.
View 11 Replies
View Related
May 26, 2013
I have "donations" form with a cbo called "DonationType".
(frmDonations.DonationType)
General
Employee Match
Employer Match
Angels*
Friends*
Royal Crown*
The last three options need to redirect the user to a different form used for pledged donations.
View 2 Replies
View Related
Sep 8, 2014
I have a table with the fields Thermometer_ID (primary key) and CalibrationType (combo box list with the options of InHouse or SendOut)
I want the user to click on a button and have an input box to input the thermometer_id. Then if the CalibrationType is InHouse open form Verification and if it's SendOut open form Thermometers.
View 2 Replies
View Related
Feb 12, 2014
I have three different forms.
1. form is a Login form where i choose between: AA, HH or FA
After choosing on my first form second form opens.
Now my question - how can i do the following:
Based on the combobox in form 1, my button i form 2 will either open form 3, 4 or 5...
View 1 Replies
View Related