Forms Instead Of <Variable>: [Prompt] In Queries/reports
Mar 30, 2005
Ok, so now this is where it's getting more complicated... (though I guess this is where you guys usually start)
When you have a query, and you type in your inputbox thingy like so:
http://reenen.fateback.com/image.jpg
PeriodEnd: [Enter period end date dd/mm/yyyy: ]
And you can have multiple, then it will prompt you for several of them.
Now this is not very tidy, so I'd rather do it on a form. How can I display the form as the query/report runs, and insert the values entered into the form as the inputs into my variables? (This case PeriodEnd)
it also prompts twice when i try printing or try to save the current page as a pdf and also when i switch record? i think its a problem with the subform as it always is trying to fetch data. would there be a way to make it so that the subform and the form are linked so that the parameter query prompts once and the information stays there rather then having to prompt again when printing or saving as pdf?Two more things - on my total value box i wish to be able to always show 2 decimal places
The code already in place is :
Net : =Sum([TotalValue]) VAT: =Sum([TotalValue])*0.2 Gross: =[Text8]+[Text10]
(Net is Text8 and VAT is Text10)
i have already specified that the decimal place value is 2 instead of auto but it still doesnt work - if the number is a whole number i still wish to see .00 at the end of the field.One last thing - Would their be a way to carry over the information from my delivery note to my invoice note? which would save a lot of time retyping the parameter query.
I have a report that is created from the following query (qryTotalProjectHours). What I am trying to do is get the total hours spent on Tasks within a given time period.
Code:
SELECT TasksEntries.Project, TasksEntries.Task, Sum(TimeTracker.WorkHours) AS TotalHours FROM TasksEntries INNER JOIN TimeTracker ON (TasksEntries.EmployeeId = TimeTracker.EmployeeId) AND (TasksEntries.TaskID = TimeTracker.TaskId) GROUP BY TasksEntries.Project, TasksEntries.Task;
I accept the start and end dates in a form and pass it like shown below. WorkDate is a column in the TimeTracker table and is not present in any other table.
When the report is invoked, I get a box where it says "Enter parameter value" for Workdate..
Is there anyway I can get rid of the prompt? I never thought you needed the column name in the SELECT statement to be able to run this.I should add the I tried the query with the WorkDate hardcoded in there and it worked fine and returned the correct results
The code below successfully saves a .pdf file to my c: drive. However, on occasion i want to overwrite a previously saved invoice e.g. 3815-140515-Bristol with an amended invoice but retain the same Invoice Number e.g. 3815-150515-Bristol.
Currently, if i save the invoice with the same invoice number but a different date it just saves down without overwriting the original invoice. Leaving 2 invoices with the same invoice numbers but with 2 different dates.
What I want to achieve is: Once I hit the SaveInvoice button the code will check that invoice Nr 3815 does not exist in c: drive and save normally. However, if it does exist a msgbox will then prompt me to overwrite.
Current code:
Private Sub SaveInvoice_Click() 'Save Invoice as PDF and annotate invoice number, site name, and date Dim slFileName As String ' create the invoice as a pdf slFileName = Me.txtInvoiceNr.Value & "-" & Format(Date, "ddmmyy") & "-" & Me.SiteName.Value & ".pdf"
I have a database of high-school football players, and I am looking to print out single page reports (or forms) that will show detail from several tables and queries. This will act as their resume when they visit schools on recruiting visits. The reason for needing query items, is that I have developed queries that return the most up to date height, weight, 40 time etc., and that single most up to date number is what should print, not the entire table. When I try to build a report it will let me bring in multiple tables, but not queries.
I have this query that finds people based on a given id number that they own. The ID number is in the format of (0000-0000) The tables have input masks so that when entering the ID number all the user has to worry about is entering the numbers. I have a report for that shows every customer in the database and i want to be able to copy and paste the (0000-0000) portion of the ID number but the query is only able to find customers by (00000000) format is there a way that i can get the query prompt to ignore the dash in between the numbers or would it be easier to remove the input mask and enter everything manually?
I have a table of data going back to 2007 that needs to be looked at on a monthly/quarterly/annual basis. I am able to filter the data when running a normal query by using
Between [Start Date] and [End Date]
in the Criteria section of the Date field. I now need to apply this same idea to a crosstab query. My current set up is:
[Gender]- Group By / Row Heading [Plan Type]- Group By / Column Heading [Pmt Amt]- Sum / Value [Date]- Where / Criteria = Between [Start Date] and [End Date]
I am getting an error message that says:"The Microsoft Office Access database engine does not recognize '[Start Date]' as a valid field name or expression."Am I setting something up incorrectly or is it impossible to use input prompts in a crosstab query like this?
I had an issue with writing LIKE statements in query criteria yesterday [URL]....
The answer they gave worked perfectly when I only used a single table in the query. But as soon as I did an INNER JOIN with two other tables, now I get parameter value prompts when I open frmSearch, and instead of seeing ALL my records when the controls are left null, I get only the first record in the table.
Here's the SQL of the query, can you point out what I messed up? NOTE that this SQL was 'written' by Access.. as I used the Query builder to set all the 'Like or Is Null' statements, then clicked SQL and sorta formatted the code so I can see what I'm looking at (instead of superthick wall-o-code):
Code: SELECT tblPeople.name, tblPeople.num FROM (tblPeople INNER JOIN tblAddresses ON tblPeople.name = tblAddresses.name) INNER JOIN tblPets ON tblPeople.name = tblPets.name
[code]....
Basically, this is a searchable database of participants in a pet-adoption program, along with the participants' pets history and address history (hence the linked tables as opposed to additional columns in one single table for pets and addresses... there are more than one in some cases). The frmSearch allows a person to run quick searches based upon ANY item in the database, such as name, pets, addresses, pet age, pet type, county of residence, etc. I need to be able to pick ANY field on frmSearch and type a value, and have the qrySearch return records for ANY record's related column wherein any part of it matches what I typed.
The statements as written worked PERFECTLY right up until I added the INNER JOIN. Now I get a set of parameter value prompts for every field on frmSearch that's referenced in the SQL for EACH table I linked to tblPeople, and if I leave everything null and click Search, I want to see EVERY person, but I'm only seeing the very FIRST person in tblPeople.
When the user enters the invoice number it populates the ship, consignee, billing address information. I have the list box to display line items for that invoice.
Currently I just have them enter the invoice number twice.
Is there a way I can take the user input and apply it to my other query?
In the past I've used command buttons with both VBA & Macros to bring up a prompt to save or discard changes to the current record then close the current form.For some reason, on just one single form that I just created, none of the techniques seem to work. It will close the form but will automatically save changes without bringing up a prompt. I've tried creating buttons from scratch, trying out both Macros & VBA, and I've tried copying/pasting buttons from other forms--of course making the appropriate changes.
On a pop up form I have a list box. The row source for the list box is
Code: SELECT tblWebOrder.WebOrderId AS [Web Order No], tblWebOrder.CustomerWebOrderNumber, Format([WebOrderDate],"dd/mm/yyyy") AS [Order Date], tblCustomer.CustomerName AS [Customer Name], tblArea.Area FROM (tblCustomer LEFT JOIN tblArea ON tblCustomer.[PhysicalAreaId] = tblArea.[AreaId]) INNER JOIN tblWebOrder ON tblCustomer.CustomerID = tblWebOrder.CustomerId WHERE (((tblWebOrder.Processed) Like [Forms]![frmSelectWebOrderToOpen]![txtOrderStatus]) AND ((tblWebOrder.WebOrderDate) Between [Forms]![frmSelectWebOrderToOpen]![dteStartDate] And [Forms]![frmSelectWebOrderToOpen]![dteEndDate]+1)) ORDER BY tblWebOrder.WebOrderId DESC;
I have the following "On Click"event on the list box
Code: Private Sub lstWebOrder_Click() lngWebOrderId = Me.lstWebOrder.Column(0) DoCmd.Echo False DoCmd.Close DoCmd.Echo True End Sub
When I click on some of the records on the list box the form closes. On some of the records I get a parameter prompt to enter:
I have several combo box fields in a bound form where they are selecting values from a list (values stored in a separate table) and then loading a number into the bound table field when selected.
How can I put a text prompt in these fields when loading the form which gets removed when focused and of course is not permitted to attempt a save into the bound numeric fields? I've done quite a bit of searching but can only find materials about doing this on bound text fields. I've also seen solutions using Nz which don't seem to work.
I KNOW I'm making this harder than it needs to be.... I have a union query that pulls from two sales tables. I'm setting up a report where a person can select a manager name, start date, and end date for those union'd sales. I can do all this no problem in the query, but I want to be able to have this information selected on a form, instead of through popups, to bring up the report. How do I link the form information to the query? I can't get the report to show information it "read" from the form. Does that make sense?
I have a db. I have created a search form which when you click the search button executes a query to find the required records. The query is currently outputting to printpreview of the query.
What i want to be able to do is have the option to select the correct record and then print it. The search can either be exact and return 1 record or use a wildcard and return a few records.
I have the report setup and working I just can't for the life of me figure out how to link everything.
I’m completely stumped … could be because its so late or my brain has just decided to give up on me!
Short of not going into too much detail, could someone advise … does one HAVE to create a query in order to create a report based on a form OR can one create a report based solely on a form?
I have a problem that is very tedious. I have 9 separate copies of the same databse (there is a copy of each database for every branch of my company. Each database has small custom features that show what company it belongs to) i was told to make a new feature, and in the making, i had to make 40 new queries, 12 new forms 8 new macros, 12 new macros and 6 new forms. this feature needs to go into all of the databases. As far as i know, im going to need to copy and paste each individual query,form, macro and form. Thats 72 different things i will have to copy and paste into 9 separate databases. Does access provide an easier way to go about this? any help?
I have a field that is giving me the number of business days between a period of time and then I want to subtract that number - the person's PTO time to see the actual days they were available...when I simply type the number in (see below) it works great but I want to set up a prompt that will ask me how many PTO Days to calculate as it will be different for each person I am quering...is this possible?
I'm trying to secure my database so users can't edit tables, forms, reports, queries, etc.I'm splitting the database, making an ACCDE for users:
1. I inserted code to disable the bypass key. 2. I inserted code to hide the Quick Access Toolbar (QAT) in the On_Load sub of the form that opens with the DB. 3. Deselect Navigation Pane, Allow Full Menus and Allow Default Shortcut Menus are deselected 4. Then, I use the immediate window to show the QAT, I then create an ACCDE.
How do I link this ACCDE with the original ACCDB? Am I supposed to delete tables from the front end and link the forms/reports to the back end DB?