I have a DB with 1000+Records. Each record has a "History" field showing the date I last visited (about 20+Visits each). When I re-visit I print Report (A4 size) which gives me the address and previous visits, however I only want my report to show the last 6 visits.
I have tried both a Query & Subform and changed the "Top Values" from ALL to 6, but this only gives the last 6 visits from all records. I need to see the last 6 visits for each record.
I am tasked with creating a scientific database of fish catches at various different sampling stations. I envisage the entry form having hierarchy levels, ie year, season, date, sample station, species caught, and then the specific associated data with each species (weight, abundance, length etc) will form each distinct record.
In each year there are 2 sampling seasons. In each sampling season there are up to 20 dates on which samples are taken. On each date there are up to 50 sample stations recorded. And at each station up to 20 species can be recorded.
In order to enter each species caught in a survey, the end user will potentially have to fill the season box with an entry 40,000 times. For each season there will be 20,000 date entries to be made. For each date, 1,000 station code entries, and 20 species entries for each station. What I would like to happen is this.
When the end user is entering the data, he or she will be working through the hierarchy from the ground up. Ie., they will enter a particular species' data (abundance, weight, length etc) at a particular station on a particular date during a particular sampling season. The next entry will be a different species at the same station on the same date during the same season. I would like the duplicated information from the previous record to be copied across onto the new one so that all the end user has to do is enter the species name, abundance weight and length data.
Once they have finished entering all the species data for that particular site, they can move onto the next site which they would fill in the data themselves for the station code. So, in the hierarchy, the first button would copy all the previous data except the species name and associated weight length abundance data. The next button would do the same, except leave the station code blank. The next button would leave the species name, station code and date blank. And so on up the hierarchy. The end user would be able to selectively choose which data is copied over by using these buttons, saving lots of potential extra work doing repetitive entries.
I built a report that provides all of the open support tickets. My idea is to have a button (Which I called "WorkIssue_Button") that displays beside each record that is populated on the report... I need this button to be able to pull the ID number of the record (Called "ID"). I then plan on opening a form that is preloaded to this record. How to pull that information?
I have a report that in the Detail section on Format will change a record to a certain color based a criteria. (See VBA code below). I would like to put a text box control in the report footer to count the number of records that turn a certain color, this is what I have so far for the text box control -
=Count(IIf([PO Date]=RGB(0,255,255),True,Null)).
It returns a zero.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) 'Set the backstyle to normal (default is usually transparent) Late_Ship.BackStyle = 1 If [Po Date] > ([Order Date] + 2) Then PO_Date.BackColor = RGB(0, 255, 255)
I tried using an IIF statement in a text box in the mainform branch header section to return the branch expense if subform branch = mainform branch.......When I run the report I get all of the Employee overhead but only the last record for Branch 2 branch expense displays.
Now the fundamental point of my Database is to take bookings, calculate the costs and print out the bills.
It all works jim dandy...BUT I havent done it in a elegant way.
So I just want to streamline the database and make it more user friendly so my Dad could also use it.
I have a Switchboard with Buttons which functions as Navigation and below that I have a subform which is based on query from my Bookings table to show my current, future bookings etc.
I want to be able to click on a record in the subform and press a button to open the report in print preview mode without having to input the booking nr.
Funnily enough I have actually found an example database which has this function but its more complex (it does it in 2 stages, so the user can still input more data in the report if required) rather than going directly to the print preview. I looked through the settings but its difficult when you dont really know what to look out for.
I have tried 2 things so far:
-Creating a macro with the OpenReport command but when I ran the macro it still wanted the Booking Nr manually inputted. - I tried a VBA code but that gave me errors and I wasnt able to debug it.
I read some things regarding the "Link Child/Master Field" but I dont know if I even need that...I *think* that is more for pulling info from the Master form to show the related data in the subform.
Basically, I've created a form to track maintenance requests for specific types of equipment. Basically it's like a ticketing system.
Once a user creates the request, I want to use a subform (I guess this is the best way) to let them add data to that specific main form record to track the progress of the request until the repair is made and the "ticket" is closed out.
Do I need to create another table for the "progress reports" (for lack of a better term) or should this be done using some sort of an append query?
I've seen plenty of sample databases where they have a box within a form that looks like a datasheet where these types of "update" notes can be added and then submitted with the click of a button, but I've never been able to get at the code behind it.
I have a form where we fill in information for supply of equipment to employees.
Each item must be signed for on a printed report.
I am encountering problems trying to create enough rows in my report detail for each signature of the items supplied.
For example, on the form I will select the "equipment" - 4 hats supplied and 3 boots. On the report I want the equipment set as the group and the detail to be a number or rows which equals the number of selected items. therefore under the Hats group heading I want 4 blank rows which are made up of 3 text boxes - Print Name, Signature & Date and another group heading for boots but with 3 lines.
I'm working on an inventory database for video tapes. Each tape has a Catagory, Sub-title, Sub-Sub-Title, Professor, Location, and Format. What I'd like is to be able to do is select a catagory from a lookup, and only the sub-titles related to that catagory appear in the sub-title lookup, not all sub-titles in the database. Following suit, I'd like the sub-title I select to bring up a limited list of sub-sub titles. I'd like a lot of things with this database. Unfortunately I have no clue how to go about doing this, which doesn't help me much. I've tried six different ways so far of attacking this, and nothing works (I've been at it for about a week). Does anyone have any suggestions, solutions, reccomendations, whatever? Any help would be appreciated. Thank you in advance.
I've created a table that take the results of a questionaire, with
0 = No 1 = Yes 2 = N/A
For each question I want to count the number of Yes, No and N/A in one query. I can get the result for one question by using Count with the critera set to = 0 or =1 or =2, but can't do it for multiple questions in one query and I don't really want to create 33 query for each answer and then join them.
I have attached the table that I'm using cos I'm not usually very good at explaining things.
I want to create a new field called Tax Deducted that if the tax discount is no, the Tax deducted = Gross Payment * (22/100) but if tax discount is yes, then Tax Deducted = 0.
I'm not sure if i'm supposed to do this in a query or in a report but that's what i need to do. I ask if anyone can tell me what i need to do so that i end up with something like this:
I am trying to figure out how to create a cumulative sum field for a test report I am working on. On a very simple level, I can run queries to get my data into the following format:
Test # | Article # | Test Time | Test Parameters 1 | 1 | 8 | A,B,C 2 | 2 | 5 | A,B,C 3 | 2 | 7 | A,B,C 4 | 2 | 9 | A,B,C
For each test number, I want a separate report page showing the article number, test time, and test parameters. Also on each page, I want to display the cumulative test time for all test numbers up to the displayed test number, but only for the article used in that test.
For this example, page three would have test number 3, article number 2, test time 7, test parameters A,B,C, and cumulative test time on article 2 of 12 (5+7), while page four would have a cumulative test time on article 2 of 21 (5+7+9).
How can I convince Access to do this for me? So far I've only been able to have a cumulative test time for all test articles, not just the test article related to the test number. To make this more complicated, Access needs to be able to have another article added at any time without having to rework the code to create the test reports.
I appreciate any help you can give me that will get me on my way.
I have two unbound unlinked subforms residing on a 3rd unbound main form. When I enter the current record on Subform1 I would like the matching record(s) on Subform2 to be highlighted or otherwise formatted. I can get this to work for only the first record on subform2 due to the way I have my code setup on Subform1:
Code: Private Sub Accounting_Unit_Enter() 'find where AUs match. only works for first Subform2 record If Me.[Accounting Unit] = Forms!MainForm.[Subform2]!AccountingUnit Then msgbox "Match" End If End Sub
My thought was that I needed to reference the Recordset of Subform2 and search for all AccountingUnits that match the current AccountingUnit of Subform1,
I have a two level security system to protect my date. The first uses the MS Access security, the second is a simple login system wherby a user enters their name and personal password to gain a customised view of the data eg if the user is me, I can see all tool bars, other users cannot. What I would like to be able to do is write a query wherby I can use the users login details to diplay only their data. An example of the script I built is as follows
'IF USERNAME AND PASSWORDS CORRECT THEN LOGIN TO THE MAIN SWITCHBOARD
If Me.qpwd.Value = DLookup("PWD", "AUTHORISED", "USERID = '" & Me.quserid.Value & " '") Or UCase$(Me.qpwd.Value) = "abcd" Then DoCmd.Close DoCmd.OpenForm "Course Booking System" Else MsgBox "Invalid Password" End If
Is there a way of including a select criteria like the following
SELECT USERID, DETAIL FROM COURSE WHERE USERID="Me.qpwd.Value"
I have tried several differnet versions for this syntax without success!
I would like to know if there is any procedure to restrict/stop auto number increment for certain number of record count (say 50), then increment by 1 for next 50 records.
I have a table 'Project Details' to which I have recently added a new field 'Last Invoice issued'. This field is a text field with a lookup and will default to 'No' for new records being added. When the related record is updated in my 'Invoices' table, I have set up a query to change 'Last Invoice Issued' to yes. This is all working fine, but it requires all the records in 'Project Details' to contain 'No' already in order for it to work. As there are over 1000 records in 'Project Details' I made a list in Excel of the right number of no's and copied it in. Most records were fine with the exception of 127. I can edit any of the other fields from the 'Project Details' datasheet or my data entry form, but when I try to edit one of the 127, I get a DataType mismatch error. I can't understand since the records are all in one table and have exactly the same DataTypes set up for each field, why I can edit some and not others? Is there some other place where DataType can be set up that may affect some records and not others?
I have tried to copy my table to post here but when I do that, I get a 'Index or Primary Key cannot contain a Null value' error due to the (New) record having the default values already in but the primary key not being filled until I save,.
I have date picker which works correctly in form. When I put that form as subform to reports header calendar shows up but after selecting date on calendar textbox stays blank. Format of textbox is Short Date, Show date picker property is For dates.
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
I have a continuous form that displays a list of invoices (frmInvoiceList) based on an adjustable filter contained within the form. I have the filters working the way that I want them through VBa and I have a button on each record to open a report (rptInvoice). Inside that report, I have some controls to "print", "email", and "export to PDF". Again all that works just the way I want. The Form and the Report are based on a different query and each has an InvoiceID field to link.
What I am trying to do is put the Print, Email, and Export buttons on the main form which would perform the appropriate action for all the records that are displayed on the form. I've been able to get the Print function to work to a degree. It will print all the records, but it changes the background colors based on the alternating records. When I go to Email or Export, it creates a single file with multiple pages and each page is a new record, again with the alternating background colors.
Ideally, I would like to have a separate file exported for each record that can be renamed and archived separately. I'm not so concerned with the email function but if it would be possible to generate a separate report for each invoice, then pull the appropriate email address for the record, that would be really nice.
I've tried some "for" and "do" loops that I found through some Googling but none of the samples ended up working like I wanted.
create a macro that automatically fills in the next invoice number in sequence",,I'm assuming this macro would look at the value of the previous record and add a one to itI don't want to use a AutoNumber field as I might need
I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)
The continuous form cannot be edited, it is to be a list for viewing the information only.
I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.
I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.
I tried the DoCmdSearch for record and just keep getting object is not open errors.
I need to dynamically change the table in the sub-report's record source. I tried (line wrapped in code tags below for reading purposes)
Code: SELECT tblProjectHistory_fldProjectID, FirstOfHistory, [History Date], [Time Spent], Employee, fldAssigned, TheFieldPriority, fldTitle, employeeID, fldTimeSpent, fldStatus, fldHistoryID, fldOrder FROM " & [TempVars]![TempEmpTempTable] & " ORDER BY fldOrder;
And I get the error of invalid bracketing of name and it refers to the [TempVars]![Temp part. Makes me believe that I cannot use TempVars in a Reports RecordSource, is that accurate? If So that leaves me trying to set a sub-reports recordsource via vba right?