Ah! I think I figured out part of the problem. I am trying to add a new Line Item by using the PartNumber to control the data in the Line Item. This won't work because I use PartNumber as the Primary Key in tblPartData; so it won't let me add an new Line Item because of a Key Violation in tblPartData. What I really need to do is change the FKInvoiceNum.
Basically I built my queries wrong and got confused. So I've just spent about 10 hours banging my head against this. When what I should have done was just written down a describe the problem, and then think about that for awhile. You know step back and look at it from a different angle.
Thanks for providing me a venue where I had to describe my problem succinctly for others. But next time I'll write up my question then let it sit for a couple of hours; to save you all some time.
I have an Access Database with a Form and a Subform for an invoicing system based on queries to the following tables:
tblInvoiceData (InvoiceNum, FKCustomerID, InvoiceDate)
tblCustomerData (CustomerID, all data pertaining to the customer -- sorry there are about 20 fields)
tblLineItemData (FKInvoiceNum, FKPartNum)
tblPartData (PartNumber, PartDescription, FKManufacturerID)
qryInvoiceExpandedData (InvoiceNum, FKCustomerID, InvoiceDate, CustomerID, and all the Customer data fields)
qryLineItemExpandedData (FKInvoiceNum, FKPartNum, PartNumber, PartDescription, FKManufacturerID, and all the manufacturer data fields)
The Main form is frmInvoiceDetails and is based on qryInvoiceExpandedData. The Subform is frmLineItemDetail and is based on qryLineItemExpandedData (includes the following fields: FKInvoiceNum, FKPartNum, PartNumber, PartDescription, FKManufacturerID, ManufacturerID, ManufacturerName) as a continues form.
The problem is that in edit or creation mode I can not change any Line Item Data, or add new Line Items. Can anyone show me where my mistake; I need to be able to change the Line Item Data in the form and can't figure it out.
Apologies if this question type was answered else where, I was unable to find it -- I expect I'm not asking the right question of the search field.
Related
First of all, I am a complete novice at spreadsheets, so please explain things to me like I'm five years old. Secondly, I've already searched this throughout the internet but the only help seems to be related to entering data based on the value of one cell, not two.
I'm a language teacher and I'm using a tracker to keep a record of all the lessons that I teach. There are three important values:
The course (Beginner, Elementary, Intermediate, Upper-Intermediate or Advanced). I'm entering this information in column C.
The lesson number (1-20). Each course contains 20 lessons. So, for example, once students complete all 20 lessons in the Beginner course, they move on to the Elementary course. I'm entering this information in column D.
The lesson title. So for example, Beginner lesson 1 is called 'Introduction to English', and Intermediate lesson 15 is called 'Making phone calls'. I'm entering this information in column E.
When I'm booked for a new lesson, I currently have to manually enter all this information. But I want to speed up the process so that I just have to enter the course name in column C and the lesson number in column D, and the third cell will automatically update in column E with the lesson title.
At the moment this tracker is one sheet. A table of all the levels, lesson numbers and lesson titles is on another sheet.
If anyone could help me accomplish this, I'd very much appreciate it!
you can use VLOOKUP where you join C&D and look that up in your other sheet where you have that table (let's say it's in Sheet1!A:C where C=Sheet1!A, D=Sheet1!B and E=Sheet1!C) then you just use this in row 2:
=INDEX(IFNA(VLOOKUP(C2:C&"×"&D2:D, {Sheet1!A:A&"×"&Sheet1!B:B, Sheet1!C:C}, 2, 0)))
update:
=INDEX(IFNA(VLOOKUP(E2:E, 'UPDATED Lessons'!A2:J,
MATCH(D2:D, 'UPDATED Lessons'!A1:J1, ), )))
#player0 helped me out with the sheet in the end with this very clever formula. Thanks so much!
=INDEX(IFNA(VLOOKUP(E2:E, 'UPDATED Lessons'!A2:J, MATCH(D2:D, 'UPDATED Lessons'!A1:J1, ), )))
I have four ComboBoxes that are linked to SQL Tables and then they are linked to a log table.
The problem I have is that the combobox is displaying the correct options but only logging the ID value.
So say I have a combobox called Location and it has 3 locations:
Cape Town
Dallas
London
The ComboBox is showing those 3 choices in the drop down but when the choice is logged it will only return the values 1,2 or 3 and not the cities
Here is the row source:
SELECT Location.ID, Location.Location FROM Location ORDER BY Location.ID, Location.Location;
But when I tried swapping the Location and ID order around it then displays the values and then logs the cities.
Also this is only an issue since I linked the tables to SQL when they were local tables it worked fine.
I must be missing some sort of search field in the source query, can anyone help me please
Thanks
Dan
I managed to solve it, I had to take ID out of the equation completely and then add into extra location columns in my row source
It ended up like this:
SELECT Location.Location, Location.Location, Location.Location FROM Location ORDER BY Location.Location;
To be honest, I stumbled across this and it works. So that will do for me!
New here, so be gentle with me. - edited to simplify
I'm trying to set up something in Access where:
user selects driver name and date
query finds stops along the driver's route
form opens with route stops (location details) filled in and user can add additional information (item picked up, weight of item)
all information gets transferred to a "Pickups" table, which has data on what was picked up, the weight, where (route stop) and by whom (driver).
I have stores A through H, and three drivers, Bob, Tom, and Jill. Bob’s route is stores A,B,C,D. Tom’s route is stores A,C,G,H, and Jill’s route is stores D,E,F,G. (I can't give real names/locations - work is very strict about privacy issues!)
Behind these are “Driver” Table, with driver name, ID, and truck info; and “Store” Table, with store name (A-H), address, phone number, and contact person.
We’re collecting all of the information about items picked up at each store into a “Pickup” table, with Fields: Date, Driver, Store, WeightOfFurniture, WeightOfBooks, WeightOfClothes
The user starts with the driver’s name and date, clicks a button, and this opens a form with the following fields:
Driver, Date, Store, WeightOfFurniture, WeightOfBooks, WeightOfClothes
with driver and date filled in based on the initial entry, and “Store” having all listings for a given driver’s route. So I select Bob and a date (11-12) and get a form with:
Name Date Store WtFurn WtBooks WtClothes
Bob 11-12 A
Bob 11-12 B
Bob 11-12 C
Bob 11-12 D
I can get the above information from a query without any problem, but I can't figure out how to (partially) fill the form with the query results (there will be multiple query results for a given route, so DLookup is not useful).
I think recordsets might be a way to go, but not sure how to do this. I'm very new at VBA, but am learning (the hard way!).
Any suggestions?
Thanks!
Use an INSERT INTO action query to insert those records into your Pickup table.
I can get the above information from a query without any problem,
This query is the SELECT FROM part for the INSERT query.
Then open your Pickup form, filtered for Driver, Date and Store that you just inserted.
I searched the web for an answer to this question but wasnt able to find one.
I am trying to create a Dashboard using SS2012 Report builder 3.0.
My Table looks kind of like this:
Machine Task Start_Date End_Date
M01 T01 01.11.2014 02.11.2014
M01 T02 02.11.2014 05.11.2014
M02 T02 01.11.2014 01.11.2014
The Dashboard is essentially a matrix, where the row headers are 'Machine' and 'Task' while the column headers are the Dates.
The cells in the matrix consist of Information about the Tasks (not shown in my example Database)
What I am trying to achieve is, that the contents of the cells are shown in every Date-column between the start and end_date of a task.
One way to theoretically solve this problem would be dublicating every row for each day it is active, but that would create a huge table.
It would be great if someone could provide me with an idea how to solve this problem.
I am still working on this problem and my best approach still seems to be creating new rows for a task if Start_Date <> End_Date
I tried working with the INSERT INTO command, but that does not seem to work with datasets but only with tables.
Something like
IFF(Fields!Start_Date.Value <> Fields!End_Date.Value, INSERT INTO dataset
VALUES(Fields!Machine.Value, Fields!Task.Value, (Fields!Start_Date+1),Fields!End_Date.Value), <Do Nothing>)
I found a similar question regarding the problem with duplication rows for each date between start_date and end_date which is already answered.
For those who also had this problem click here
I am somewhat new to crystal reports and the syntax involved, and cannot seem to find the specifics by searching.
The problem is,
I need to check a condition of another record (linked as in image) for when Op No=10 in table Route, I must then check the Date Complete of this record in table WO Route Schedule for the same OP (see image for how they are linked) with a date input by user when the report is ran.
Table links
The jist is, im trying to show the font of a field in red when Date Complete>=FDate (user) (FOR OP 10), but since the actual list i am generating is of OPs that are not 10, I cannot seem to point crystal to look for when Op No=10, which is linked to the current OP by Route_ID and Work Order_ID! I have been trying many If statements, as well as using a case statement for when Op_No=10, but to no avail.
As a novice, I am not entirely sure of what other information is needed. Hopefully the images help explain my motive, but please ask for more info if you think this problem can be solved.
Regards
EDIT: More context if it helps (first comment)
Yeah it's hard to explain without overdoing the details, but each work order (WO) has around 100 operations (OPs). Now, crystal reports generates a list of OPs which are still active on the shop floor, but firstly it must check if a certain OP has been completed FOR THAT work order, which then produces a field with red font for when OP number 10 is completed. Now, if I was to simply put If {WO_Route_Schedule.Date_Complete}>={?FDate} , it would use the current OPs complete date, not OP No 10 for that Work order!
ok try below solution:
Place below condition in record selection formula .
{WO_Route_Schedule.Date_Complete}>={?FDate}
to find record selection formula go to File--> selectin formula ---> record
Place the op field OP No in detail section,
Now right click the op no field go to Format field ---> Tab Font ---> formula editor of color
write below condition there
if Op No=10
then crRed
else crBlack
Let me know how it goes