I am performing the following query using an ADO connection from Excel;
SELECT [Date], SUM([Batch Qty]) As [Batch] FROM [Speed Fastener Packing] WHERE ([Date] BETWEEN #03/04/2006# AND #05/04/2006#) GROUP BY [Date] ORDER BY [Date]
When I execute this statement in Access it generates The following;
Why is the statement returning results that are not between the dates specified?? The [Date] field in the Db is in format Date/Time Short Date dd/mm/yyyy.
Dont have a clue what I'm doing wrong! TIA, any ideas appreciated!
I have a query that is returning inaccurate "Date Completed" results. Here is the SQL:
PARAMETERS [Enter Start Date] Text ( 255 ), [Enter End Date] Text ( 255 ); SELECT DISTINCT [Qry BDM FA English Email Test Part 1].ADI_DISTRIBUTOR_ADVISOR, ADL_AAH_ADVISOR_ACTIVITY_HISTORY.AAH_DATE_COMPLETE D, [Qry BDM FA English Email Test Part 1].AGA_EMAIL, ADL_AAH_ADVISOR_ACTIVITY_HISTORY.AAH_EMP_ID, DateAdd("d",180,Date()) AS [Next Update],
This is surely simple, but I can't figure it out. Basically here are the 3 tables in my query with their respective fields. tblItems (ItemNo,Location) tlbDescriptions (ItemNo, ItemDesc) tblOrders (ItemNo, OrderQty)
I want to list all items with their related descriptions and list any orders associated with the items.
Here's what I have so far (in sql):
SELECT tblItems.ItemNo, tblItems.Location, tblDescription.ItemNo, tblDescription.ItemDesc FROM tblDescriptions INNER JOIN tblItems ON tblDescriptions.ItemNo=tblItems.ItemNo WHERE tblItems.Location = "1";
This seems to work fine, except that when I try to include the last table (tblorders) to find out which items have orders, it gives me only those items that have orders. What I want is all the items and see the ordered qty if there is for that item.
Now this is an external database so I can't change any of the tables and I have to do this in one query.
I can not, or not allowed to enter data in fields in a query built from three tables that are jointed by a common field with the same name. The parent table is linked to another Access data base as is one child table the other is local data. Also, I am not able to view the child table data when viewing the parent table.
i have a combo box in a form listing various people featured in pictures. i expected that if i chose a person from the combo and created a query with the criteria [Forms]![form name]![combobox name] in the person field then i would get a list of all pictures relating to that person -- this doesnt seem to work for combo boxes? -- if i change the combo box to textbox and insert a name --then it works. am i missing something very simple here?
I have done some searches and found out about creating joins and have almost achieved the results I want. I have 4 tables (Invoices, Labor, Purchases, and Payments). All are linked by Invoice number and all of the data is enter via a form called invoices and has a subform for all of the other parts. I am creating a query to pull the total amount of the invoice from the parts of the table and then taking the payment and showing a report for this.
I created 4 total queries and then have nested them into a query. I then perform the calculations and have my results that I can then put into a report. Only problem is that if there is not data in the labor table for an invoice it does not show the invoice in the final query. Homever, if there is no payment data or purchase data it will show the invoice and leave those fields empty. Not sure why this is happening I used the same type of join on all of the queries.
Would love to try and understand why this is not working correctly. I can get around this by just entering a 0 for work hours on the subform, but I am thinking that there should be a way to this without doing that.
Anyway, if any one can help me understand the problem, it would be greatly appreciated.
I have attached a very scaled down version of the tables I am working with and the problem is in the InvoiceTotalsQuery. I have not performed the calculations in this, just want to see why invoice 7 is not showing.
My raw data contains a text string with various codes separated by an underscore. For example, my raw data would contain a string like this, "SAMPLE_DATA_ABC1_NYC", and each of those codes would have corresponding name that is mapped out on another table.
I'd like to set up a query that would evaluate the raw data, look up the associated code (e.g. "_ABC1_") and then return the corresponding name. (See screenshot for an example.)
I tried using IIf and InStr statements, but I keep getting excess rows.
Code: SELECT st.Campaign, st.Month, st.Week, st.Placement, st.[Placement ID], IIf(InStr(st.placement, ic.[findInventoryCategory]) > 0,ic.[InventoryCat],"N/A") AS [Inventory Category], IIf(InStr(st.placement, pth.[findPathway]) > 0,pth.[Pathways],"N/A") AS [Pathway Name] FROM RawDataFile AS st, mpInventoryCategory AS ic, mpPathway AS pth;
I have code to open a new email and populate the BCC field. My problem is the company usually uses a template for all emails they send, from access how to I het outlook to use the the usually template?
I would like to produce a serial which will have 4 members.The first, the second and the fourth members will be always CAPITAL Letters and the thirth one is always NUMBER.Here is an example for the format: AC3H
Each member will change in any line and never match... I would like to produce it by a button or a button for each one.The last important point for this issue is; I would llike to identfy the total number of serials.
Hello, I have created a form to enable data to be easily added to the database table, however does anybody know why the query that looks up the records from the table does not return the new entered records, only what was originally in the table? Thanks
i do a query and outer join this table with a query and it produces LESS records = 3733
:confused:
now i always assumed (never assume it makes an "ass" out "u" and "me" !) that the records would be the same as the table you were joining from, obviously i've assumed wrongly, but why?
the query i'm using as my lookup query is grouped and i think that is causing me problems...if i turn it into a table, it works as expected
:confused:
and i check the obvious: no filters or SELECT DISTINCT...
I am building a database which produces a report which I have formatted as a letter, I know I could have done this via a mail merge etc however...
What I am wanting to achieve is when this report(letter) is run, is there a way that when it is produced from a macro button embedded in a form that this report can then be saved as a pdf attachment within the same access database attached to a client record?
Clng([text field]) to convert a text field into a number so that I can link in a query. Because it is an informix database, I cannot change the underlying table format.
When I run the query, the data is showing "Error".
I tried changing the other table to text and linking but it doesn't seem to link properly because the query doesn't work.
I have a non standard size report (for printing labels)
The report is just over 10cm wide and just over 15cm deep.
I have solved the blank pages caused by exceeding the width but I'm still getting a blank page when I move some data down. I am still within 15 cm but it's throwing me a blank page. Even if I extend the in design mode depth to say 20cm (ie the height in Detail) it's throwing a blank page (I can see this in print preview).
I initially set up the report (it's a long time ago so memory fades) using the label wizard setting up a label 4*6 inches (10.16 * 15.24 cms) and it is this i'm trying to tweak. Is there a property I'm missing somewhere?
I am trying to filter a form to show the entire weekend's activity on Monday but only yesterday's activity Tuesday through Friday. Using this code I can return Friday's results on Monday and yesterday's for the rest. How do I get the range Friday to Sunday?
Hi everyone, I have a bound checkbox on a continuous form and I want the user to be able to select only one checkbox at a time. At the moment they can select as many as they like which is not what I want. Anyone know how to do this?
I have a bound combo box on a form. The selections alow a subform to refresh limiting records to the bound combo box. I have been on the web a lot looking for a way to enable multi list selection or all on a combo box. None of these have worked for me. The selection combo box is a simple Yes or No. I would like to add all and have it return both types of records.
This is the sytax I have in the row source property for my combo box.
SELECT [Sales Master].[Accounting Comp Flag] FROM [Sales Master] UNION Select "All" FROM [Sales Master] GROUP BY [Sales Master].[Accounting Comp Flag];
This code allows the combo box to have an all selection but it does not retrieve any records.
If someone can find my mistake that would be great! Thanks!
hey all i was wondering, can a unbound text box be a bound textbox. I have just noticed that my unbound text box doesnt not save in the field in my table, that is because it is unboune right? but i need it to save to my table, and i guees the only way to do that is to save in in the save button right? thanks
hey all i was wondering, can a unbound text box be a bound textbox. I have just noticed that my unbound text box doesnt not save in the field in my table, that is because it is unboune right? but i need it to save to my table, and i guees the only way to do that is to save in in the save button right? thanks
In the interest of speed in my current project, I'm working with bound forms, where in the past I have developed mainly using unbound forms. Hence, the word novice in my subject line.
Is there a way to do the following, and is it typically done?
The layout: A typical, record by record data entry main form, with a linked datasheet subform. The underlying query contains person's names and other associated data. The subform is a datasheet with an alphabetical listing of the person's names.
My goals (2 of them): 1. To have the datasheet subform go to the record selected on the main form. 2. To have the main form also go to the record selected in the subform.
The forms' On Current events conflicting with one another, as the subform's Current event fires whenever the main form's does.
Form is Single Bound DataSource is a simple select query which includes all records in a table.
All I want to do is validate what is typed into the textbox.
I have the following code in the BeforeUpdate Event of txtTest: Private Sub txtTest_BeforeUpdate(Cancel As Integer) If Me.txtTest = "Test" Then Cancel = vbCancel Me.txtTest.Undo End If End Sub
It works fine on an Edit but when I type "Test" into a new record and try to move or save I get the error: The value in the field or record violates the validation rule blah blah BLAH.
I have a text box on a form that is bound to a field in a table that is populated by a combo box coded into the table whose data source is a select query.
Everything looks fine in the table, but when I display the data on the form it is displaying a different field of the source select query than the one displayed on the table.
I have a database that has student table (I am not a student doing an assessment!) with a one to many relationship to coursebooking and then a course table that has a one to many relationship with the coursebooking table so coursebooking seems to be acting as the link table between the many to many relationship. (I didnt design it).
I am creating forms to make the booking process faster and to perform the correct sums to produce an invoice and update a financial transactions table along the line.
I have an entry form that creates the student, and then other forms synchronise to the master form and gather the data. I am now at the point of wanting to get product details so ex course A, taxi to school and enrolment fee and add these to the booking table.
Historically the process was messy and couldnt calculate course A cost (per week) times by number of weeks.
I want to be able to select the products from a combo to build up an invoice and then once acknowledged as details correct commit to the tables coursebooking and transaction table.
I am not sure how best to achieve this ie is it best to have a bound form to the booking table and add new records to it line by line or to use an unbound form and some kind of product picker and to see the products built up perhaps using vba and storing products in an array until ready to post.
I have a main bound form which has tabs.On some tabs i m calling the subforms which are also bound forms.
I am facing a problem in which access automatically saves the data eevn if u dont want to save it.In my subforms i have save button to save the data ..i am also doing some validations there
but if the user is filling some information and then he hits the another tab the data gets stored automatically.
is there any event for the form where i can undo if the user has entered some data..