Query That Prints Min/max Value From Data Gathered By Form Combo Box
Apr 4, 2006
i have a query that prints records from 3 different tables that match values entered through a combo box on a form.
here is the code (i know its messy):
SELECT Host_Countries.HostCountryName, Guest_Countries.GuestCountryName, Census_Data.ForeignBornTotal, IIS_Data.IISData, CoE_Data.ForeignCitizenship
FROM ((Host_Countries INNER JOIN (Guest_Countries INNER JOIN Census_Data ON Guest_Countries.GuestID = Census_Data.GuestID) ON Host_Countries.HostID = Census_Data.HostID) INNER JOIN IIS_Data ON (Guest_Countries.GuestID = IIS_Data.GuestID) AND (Host_Countries.HostID = IIS_Data.HostID)) INNER JOIN CoE_Data ON (Host_Countries.HostID = CoE_Data.HostID) AND (Guest_Countries.GuestID = CoE_Data.GuestID)
WHERE (((Host_Countries.HostID)=[Forms]![frmHostForm].[cboSelectHost]) AND ((Guest_Countries.GuestID)=[Forms]![frmHostForm].[cboSelectGuest]));
what i want it to do is to print what it shows, but then also have it print me the min and max values (the range of the data) in a new column as well. is this even possible? does anyone know what i mean? any help would be greatly appreciated.
View Replies
ADVERTISEMENT
May 26, 2006
I am creating a form that is a letter. This letter will get printed off a lot. A line at the bottom of the sheet makes it look tacky. I am told this line prints on our other databases also. How do you get rid of it? Our company uses access 97 :mad:
View 6 Replies
View Related
Aug 25, 2014
I have a form that looks and prints exactly as I want it to, except for two little things. These things are extra pages. They don't appear on the print preview, but they always show up on the printer and on the pdf file when I email it. One page is blank and the last page has "Page 1 of 1" at the bottom right corner of the page. I would always limiting the printing to one page.
View 7 Replies
View Related
May 11, 2015
I have a report , which i print every month and it consist of of more than 500 pages. This report is based on a Query called L_Inv2. i want to filter and loop this report based on the filed AccountReference with in the query. And save as PDF for individual accounts.
i have also created another query based on the L_Inv2, Called L_Inv4 which only got the record of account numbers as a AccountReference
i am trying to use below code but some how this is not working.
Code:
Private Sub Command43_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
[Code]....
View 6 Replies
View Related
Apr 14, 2015
I have been tasked with creating a tool to analyse mobile phone bill data and present the analysis, and our recommendation, to a customers. Being new to Access (other than basic tuition) this has been a slow uphill task, which is finally nearing completion, however there is a problem which I have not yet been able to overcome.
The requirement is for the DB to open first on a splash screen (lets call it Form A) with fancy picture where our customer is selected from a combo box, the customer is then telephoned, a linked computer screen is established and our staff then click "Go" to proceed to a second form (Form B) showing an account overview and more details.
The problem I have is when "Go" is clicked, the second form loads via on click event, and even populates the correct customer in its combo box. Unfortunately that is as far as it gets - the combo does not look up the information. The customer needs to be selected again for the subforms and subreports to load with the customer overview. To clarify, form B just sits there blank until the customer is re-selcted from the combo box in form B.
View 9 Replies
View Related
Jan 17, 2007
I have a database that is uses a job number as the primary key, on a form that has been querried from this key to have a single button to print the report, from the number that is held in the txtbox would I have to create this in the on click properties and if so please help!
Regards
View 4 Replies
View Related
Sep 27, 2006
Does anyone know if its possible to save screen prints in a table?
View 3 Replies
View Related
Aug 6, 2007
Hi,
I'm running into a problem where parts of a Report are printing with a gray background. Not all of the report does this, just certain sections. Background colors aren't set to anything.
I did find this thread:
http://www.access-programmers.co.uk/forums/showthread.php?t=16054&highlight=background+print+color
problem is.. the print IS from a report-- and I don't want to see a color on screen, I want it to NOT print gray.
any suggestions where to start?
Thanks
View 5 Replies
View Related
Feb 10, 2014
I have a report that's oriented landscape. I have scaled and placed everything to fit on a 11" x 8.5" page (the current dimensions of the report are 10.375" x 7.75"). The Layout view shows that everything fits within the borders.
Despite all of this, Print view insists on including a second, blank page. And since the general user will initially be viewing it in Report view (which doesn't indicate 2 pages), then printing if they so desire, they won't know there's a blank page.If not, I'll just tell people to make sure to only print page 1 in the printer dialog box.
View 3 Replies
View Related
Mar 13, 2014
I have an access report that consists of numerous other subreports. My issue is that one last blank page prints at the very end of the report. All margins are sized correctly and have set the 'Force New Page' setting to 'None' for all Group Headings (I should mention that I have each subreport within it's own group heading...so a total of 8 subreports in 8 group headings). The odd thing is that I have the page #'s printing in the page footer and on the last page it's printing page + 1 of x pages (e.g. page 129 of 128). I have removed the report header and footer, but have the same result. None of the other subreports produce an extra page when run separately.
View 2 Replies
View Related
Apr 16, 2013
I have a multi-field search form with a tickbox that is tied to 2 queries that is tied to 2 reports. The form works great and I get all the results I want, but my report doesn't display on my monitor, it simply prints up! How can I get it to stop doing this and show only on my screen?
My code on the "run search" button is:
If Me.[OptionalCheckBox]=True Then
DoCmd.OpenReport "rptReport1" acViewNormal, acWindowNormal
Else
DoCmd.OpenReport "rptReport2" acViewNormal, acWindowNormal
View 1 Replies
View Related
Mar 20, 2013
I am working with an already intact database along with a form. One of the buttions in the form, when pressed, prints two copies of a P.O. One copy says original on the bottom and the other says PX Copy and my boss wants the PX Copy to stop printing. How do I get it to stop?
View 3 Replies
View Related
Jul 12, 2014
I have a form for adding new bookings to a database, as well as the original form for adding the passengers.
I have created a combo box on the 'add booking' form which brings a drop down of existing passengers to choose from under the 'surname' field. However it was not assigning the bookings to the passenger on the 'add passenger' table.
I changed the control source of the form property to the Customer ID (the autonumber) and the bookings now seem to be linking to the passengers. However the 'surname' box in the table is empty - if I change the control source back to 'surname' then the bookings stop linking again.
View 14 Replies
View Related
Jul 15, 2007
hi, i have a query which when the user selects a value in a combo box it pulls up the other details of the item, such as price.
i have noticed though that if i try and enter a new item into the list, through the combo on the form and then enter a price, it gives me error 3101 (something to do with not being able to find the record.
i assume this is because it is trying to locate the chosen item of data within the main table and pull up a price.
is there any way around this.
jjames
View 1 Replies
View Related
Jun 3, 2015
I want a combo box in a form for data entry. Is the best method in doing this creating a new combo box in the form and linking it to a table, or using a lookup field in my table?
View 14 Replies
View Related
Oct 9, 2013
I'm trying to create a Data Entry only form based on a small table called tblProject.
It consist of the fields Project_ID, Artist_ID, Project_Name, and Project_Notes.
I used the wizard to get me started and i know how to change the form to data entry only, but the problem is the vague data in the Artist_ID control. It shows up as a number, because it is an FK to another table (tblArtist) where more details on the artist are held. (including Band_Name)
I want to be able to make it a combobox with a list of the Band_Names from the tblArtist table. This would make creating "a new project" much easier.
View 4 Replies
View Related
Sep 4, 2014
I have a form named CustomerForm.I have a query named CustomerQ. On my form I have a combo box named combo6.Combo 6 lists all of the company names from my customer table and includes the autokey field which is hidden.When I click on a value in my combo6 I want the values on my form to then be based on the value from combo6 whereas at the moment I select a value in combo6 and nothing happens other than combo6 now displays a different value. how to refresh/ repopulate the data based on combo6 without having to create more forms and queries.
View 14 Replies
View Related
Feb 19, 2015
I would like to filter a data from a table using a combo box in a form.
The field I would like to filter is called ManufacturersID in MainTable and consist of text and wildcard characters [e.g., Teledyne O&G (ODI), TE Connectivity (Deutsch), etc...], so are the combo strings which are extracted from the table ManufacturersTable. It is not filtering anything. I suspect that the wildcards and spaces are the problem. I also tried to get the combo string to a text box in the form and use it in the query with no success. Additionally, I also tried Like [Forms]![FormName]![textbox] in query criteria but still not filtering...
How can I overcome this?
View 2 Replies
View Related
Jan 28, 2015
I have created a combo box which lists companys, when i click on a certain company it brings all records for that company but underneath the last record it shows all the other records on the form.
How do i get it to only show the records for that company only.
View 5 Replies
View Related
Nov 26, 2007
Hi,
I have a form build up with a subform in access 2003. Then I have an Insert button on this form which when clicked opens another form which is build up with a combo box. Now, when I select a field for example (Student_ID) from the combo box I would like to be in a position to click it once (the respective student_ID) so that the student_ID in that field is transferred to the subform of the initial form, which has a Student_ID field to store the respective student_ID in the table with the Subform.
How can I do that?
Any help will indeed be highly appreciated.
Regards
View 2 Replies
View Related
Jul 2, 2013
I manage an Access application that in many instances uses data selected from a combo on a form for variable criteria. In this instance it is in the form of:
[Forms]![Main Navigation]![Print Menu]![SchoolYear]
I recently wrote a routing that exports to Excel based on a record set derived from a query. In testing I hard-coded the criteria (School Year) in the query. Once everything worked I sustituted the variable above. Now, in the VBA, no records are put into the recordset, when I run the queries directly from Access they work correctly, drawing the results for the school year selected on the form referenced.
'Create The Recordset
If Me.Frame11 = 1 Then
strQueryName = "ExcelHS"
GroupTitle = "High School"
Else
strQueryName = "ExcelMS"
GroupTitle = "Middle School"
End If
Set objRst = Application.CurrentDb.OpenRecordset(strQueryName)
View 1 Replies
View Related
Nov 6, 2014
I am adding a combo box to a form with data sourced from a table. Everything seems ok but when I select an option from the combo list and move to the next record the selection is repeated there also. How do I get to select a different option in the next record?
View 1 Replies
View Related
May 16, 2014
My intentions are to get my combo box to display data into a field in my form, when it is changed/selection is made. So far my form has the following:
Combobox: CBOCharacters
Field: CharacterGender
Both of these are in the same table; tbl_Characters. The data type for CBOCharacters is a number and its called CharacterID in the table.
So far I have created this piece of code:
Private Sub CBOCharacters_AfterUpdate()
Me.CharacterGender = DLookup("CharacterGender", "qry_StillNeeded", "[CharacterID]= " & Me.CBOCharacters)
End Sub
When I run this event procedure i get an error:
Runtime error '2471'
The expression you entered as a query parameter produced this error '[CharacterID]'
View 3 Replies
View Related
Feb 6, 2014
I have a modal form with a combo box and a search button.
When the button in pressed, the value of the combo box is the parameter of a query.
Copy and paste of the search button code:
Code:
Private Sub btnSearch_Click()
Dim db As DAO.Database
Dim qdef As DAO.QueryDef
Dim strSQL As String
[Code] ....
I've tested the SQL query produced by the search button and it works, but when I try to push the button, I receive an error on the following line:
Set qdef = db.QueryDefs("qryFilteredData")
View 6 Replies
View Related
Dec 29, 2014
I created a new field as a text box, converted it to Combo box, then the Values are pulled from a query and all that works fine.
I have a form that opens and displays these Fields in a Data Sheet view and the new Combo box doesn't drop down and is flagged as a text box in the property bar but no way to change it??
I need the drop down like the other Category field I have, that works but this one doesn't.
See screen shot.
You can see in the Category field, there is a Drop down, but in Category II there is not, even though this is a drop down field. - BUT in this data sheet view it doesn't show it as a drop down.
[URL] ......
View 5 Replies
View Related
Jun 1, 2012
I use filter Combo boxes in a lot of places so that users can filter records easily. (Not combo boxes for input).I have them labeled as filters but nonetheless users keep trying to input into them for some reason.How would I add a message box to it so that it states that 'this box is not for data entry etc'.
View 2 Replies
View Related