Not Sure I Have My Relationships Correct...
Nov 10, 2005
Hi everyone,
I am trying to build a little shopping cart. I think my major problem is the relationships. I can't seem to get them right.
My major problem is adding items to the shoping cart (basket).
I guess 1 item can go in many baskets and a basket can hold many items. Make sense?
so i have my tblItem & tblBasket, and then I made another table called tblConnectBasketItem, which holds the itemid & basketid.
In any rate, this is where I got confused.
If someone can look over my DB, and give me some pointers, that would be great and thankfull.
You can find my DB attached.
Thanks again,
Sass
View Replies
ADVERTISEMENT
Mar 2, 2012
The code I have is.
Code:
Private Sub Command26_Click()
If Forms![test site]![prp test].Form.[A Right Answer] = -1 Then
Forms![test site]![number correct] = Forms![test site]![number correct] + 1
End If
DoCmd.FindNext
End Sub
Then when clicked it checks a yes/no box to see if "A right Answer" is the correct yes. Then it should pop to the main form and take the number correct cell and add one to it. I am trying to get the record to go to the next record inside the sub-form but docmd.findnext seems to be wrong too.
View 4 Replies
View Related
Jun 11, 2005
I’m struggling to fix a database for my state agency. Here’s what the social workers need:
The agency holds several Foster Parent training sessions a year. Each session consists of 9 classes. We need to track ‘student’ attendance at each class. We also need to track class dates for each student.
The fly-in-the-ointment: ‘Student’ foster parents must attend the 9 classes, but they can fulfill this requirement over several sessions. They can take classes 1, 2 and 5 in Session 1, classes 3, 4, 7 in Session 2, and so on.
Here’s what I’ve created:
tblSessions
SessionID
SessionLocationkey ( to tblLocations; irrelevant to this post)
SessionStartDate
SessionName
tblClasses
ClassID
SessionIDkey
ClassTopic
ClassDate
tblAttendance
ClassID
StudentID
tblStudents
StudentID
StudentFirstname
etc.
The Attendance table is the junction table for the many-to-many relationship between Students and Classes.
Is this the correct structure? Thanks in advance for any advice. And thanks to Pat Hartman, The Doc Man, and SJ McAbney for getting me this far with the advice I found in researching this topic.
Sean
View 12 Replies
View Related
Apr 26, 2006
tblFAR
FarNumID (PK)
FarNumber
FarTitle
tblFarParagraph
FarParaID (PK)
FarNumID (fk from tblFAR)
FarParaTitle
FarParaText
tblAC
ACNumID (PK)
ACNumber
ACTitle
tblACParagraph
ACParaID (PK)
ACNumID (fk from tblAC)
ACParaTitle
ACParaText
1.Each FAR contains Many FarParagraph 1 to Many
2.Each AC contains Many ACParagraph 1 to Many
3.Each FarRParagraph contains Many ACParagraph
AND
Each ACParagraph contains Many FarParagraph Many to Many
What I’m trying to do:
FAR
Chapter 1
Paragraph a – Relates to AC Chapter 4 paragraph a1
Paragraph b – Relates to AC Chapter 4 paragraph a
Paragraph c – Relates to AC chapter 6 paragraph b
AC
Chapter 4
Paragraph a – Relates to FAR Chapter 1 paragraph b
Paragraph a1 – Relates to FAR Chapter 1 paragraph a
Paragraph a2 – Relates to FAR Chapter 6 paragraph c
Paragraph b – Relates to FAR Chapter 8 paragraph d
I’m not sure if my design is correct for what I want.
BTW -- AN "AC" and "FAR" are just a type of document.
Thanks
Paul
View 1 Replies
View Related
Mar 31, 2005
Dear All
It may be a very dump question but I can't get my head around it.
I have a MainForm and then a subform Form1 on it.
There is a command button cmd1 on subform Form1. Now I want to access cmd1 through another command button cmd2 on a different form Form2. How would I design the statement?
I have tried the followings on OnClick event of cmd2 on Form2
Forms!MainForm.Form1.cmd1.visible = true
Forms!MainForm.cmd1.visible=true
Forms!Form1.cmd1.visible=true
Forms!MainForm.Subform.Form1.cmd1.visible=true
Nothing works. Any suggestions?
Thank you
:confused: :confused:
View 3 Replies
View Related
Jun 29, 2005
Hi guys,
Attached is a real simple database. What I want to be able to do is insert new payment details, and I have a couple of issues.
I have two clients and need to be able to select which client I want, select the payment details from the drop down list and enter in some appropriate amount.
Its been a while since I've created a db from scratch so this is obviously where I am having my difficulties. However I think I need to use a sub form.
How can I input the details as above, and how can I always get the combobox to default to the first entry in the list rather than defaulting to zero?
Thanks for the pointers.
View 3 Replies
View Related
Oct 11, 2004
End result query example:
Between #10/15/04" And #10/15/04# - 6
Or the date range of 10/10/04 through 10/15/04
This would be in a query under the Date field
What is the correct syntax? Please include
() and # signs where they need to be.
Thank you.
View 1 Replies
View Related
Sep 2, 2014
I have a form that should give me all values below " 0" but I am getting zero
but when I click on that value I see this
-1.52587890625E-05
View 3 Replies
View Related
Mar 10, 2006
I have an order table and depending on the the product grp it needs to then be able to select the appropriate size scale table.
e.g.
I order suits, and select a size grade A ( there are 7 size grades ) I then then to enter the size scale for that product. I am not sure whether to create 7 differant tables with the different size grades and link that to the table, if so how do i get it select the correct table.
please help...
H
View 1 Replies
View Related
Mar 10, 2006
Selecting the correct table
--------------------------------------------------------------------------------
I have an order table and depending on the the product grp it needs to then be able to select the appropriate size scale table.
e.g.
I order suits, and select a size grade A ( there are 7 size grades ) I then then to enter the size scale for that product. I am not sure whether to create 7 differant tables with the different size grades and link that to the table, if so how do i get it select the correct table.
please help...
H
View 2 Replies
View Related
Jun 14, 2006
Hi all..
I have a simple database setup...
When I do a test query on the tblMain.. all I get are numbers.. How do I change the numbers to text?
Thanks again
R~
View 2 Replies
View Related
Mar 14, 2008
I wonder if any one can help with this one, shown below are 2 examples of strings in a field called PROCOM
Occurred: EnterMeterReadings; Reason: Reading greater than upper limit; Session: 0A52BE4293.worker1
MSPSubmitMeterReadings; Reason: CANNOT BILL LATER THAN 29/02/08, DATE AMENDED FROM 13/03/08
I ususally nest IIf statements to abbreviate these in another field (PROC), as PROC: IIf ([PROCOM] like Occurred: EnterMeterReadings; Reason: Reading greater than upper limitMRE-Upper limit",[PROCOM])
The problem I have is there now 30 permutations of the error and IIF can only nest 8 statements (and it looks very messy). I thought that Select Case would do the job but I cannot use
Select Case
Case Is Like "Occurred: EnterMeterReadings; Reason: Reading greater than upper limit*"
Hope someone can help with this one
Thanks in advance
View 8 Replies
View Related
Mar 3, 2005
Very simple question:
How do I make the results of a query which I am displaying in a combo box appear in order.
e.g. 1 then below that 2 then below 3 then below 4 etc
even though I may have entered the details in a different order. I've tried doing it order by ascending and decending but this doesn't work.
Many thanks
Paul.
View 1 Replies
View Related
Feb 2, 2006
This is what I'm trying to fit into the control box. Maybe there is a much better way to do it so suggestions are very welcome. I don't know if I can even use "!" in the IIF statement. And I think it's too long, so it's invalid.
What I'm trying to do is to check if all those fields are passing (or NOT failing). Then insert "Yes" or "No" into a textbox.
----------------------------------------------------------------
Code
----------------------------------------------------------------
IIF(blackStartPlans!=”fail” and operatorTraining!=”fail” and telemetryAvailable!=”fail” and backupControlCenter!=”fail” and vegetationManagement!=”fail” and capacityEmergencies!=”fail” and cat_A_contingency!=”fail” and cat_B_contingency!=”fail” and cat_C_contingency!=”fail” and cat_D_contingency!=”fail” and electricityFacRating!=”fail” and relayMaintenance!=”fail” and UFLS!=”fail” and UVLS!=”fail” and Other!=”fail”, “Yes”, “No”)
View 5 Replies
View Related
Aug 16, 2006
first of all sorry to my poor English
I have subform of inventry Transaction there are field productId, UnitsSale, SalePrice
I am using combo box on productId and want to calculate When i change productId (Stock in hand to show on msgbox) for the productId which i choosen from combo box
if any one know about it please help
Baig
View 1 Replies
View Related
Nov 14, 2006
Sorry...attached the wrong file. Here it is again.
View 4 Replies
View Related
Mar 1, 2007
OK, my database is also complete, thanks to the help of this forum!!!
My next question is:
I have a switchboard that has a button for my data entry form. The lady that will use this form will, of course, enter all her records using the form into the database. Because of what she does, she will have to go back to records on a daily basis to make corrections to individual records. I would like a way to put a command button on my switchboard that will say something like "Correct Records". She will hit this button and it will ask her for the medical record number she wants to correct and then will take her to that record to correct.
Is there a way to do this or is there a better way? Currently I have a button that will ask for a day range and then will bring up a query of those records for her to correct but I would really like to be able to somehow bring up the individual record, by medical records number, for her to correct instead of going through a long list of records that were input on a single day. Thanks so much for all your help getting this thing up and running!!!!
View 4 Replies
View Related
Jul 3, 2006
Hi everyone,
I'm having an issue with a query I created. When run the query requests an Artist Name. I enter this and it returns one result. However in actual table ther are two results for that artist. The only difference is that for the record that doesnt appear the field labelled "Gallery" has a zero value.
I have checked the table and the gallery field is not set to a required field so I dont understand why it wont show it as a result of the query.
Any ideas?
View 3 Replies
View Related
May 9, 2006
One of my probs with access is changing the form when a different resolution is being set.
Is there a visual basic module or something else to display the form properly dependent of the selected resolution?
View 1 Replies
View Related
Jul 15, 2007
Hope I explain this clearly -
I have a combo box with four choices. I then have four labels.
If i select A in the combo box i want LabelA to show up, B in combo box Label B (but not Label A) and so on.
I have set the property for all labels to (not) visible.
Then on the combo box I have put
(On Click) event if cmboxx is "A" then
me. label A.visible = true else me.label A.visible = false end if.
This works fine if I am entering a new dataset but when I exit from the database and then go back in, the label is not visible.
I have tried entering the code in the OnLoad event of the form but that doesn't work. Any ideas?
Also - if the combo box also has its selection made before I enter this code then the label is not visible until i go back and re-enter (ie" click) it. Any ideas
View 3 Replies
View Related
Aug 7, 2014
I am using MS Access with SharePoint Lists and some Access Tables to generate reports in pre-formatted MS Excel Worksheets. My main module opens several classes. One of the classes receives a worksheet to keep in a historical book. This class can receive any one of several different types of pre-formatted worksheets. After all is said an done the class adds a cover sheet to the consolidated workbook and adds hyperlinks to the other sheets, kinda like a table of content.In the class I have the following in the general declaration.
code:
Public Enum BookType
A = 1
B = 2
End Enum
Private pBookType As BookType
Later in the class I have the following:
Code:
Public Property Let LoadBookType(ByVal btNewValue As BookType)
pBookType = btNewValue
AddWorkBook
End Property
in the main modual I have the following
Code:
classConsolidated.LoadBookType = A
When assigning the above property it passes in "11"
if I change it to the following
Code:
classConsolidated.LoadBookType = BookType.A
it passes in "1" as I expect and use in a Select Case statement later in the class.So why does one pass in "11" but the other passes in "1"?
View 14 Replies
View Related
Jun 4, 2013
I have an old Access 2000 database which needs some functionality update, and I can't get things working as they should.
The issue is related to frmOrderDetails form based on tblOrderDetails table, with following fields:
Order_ID
Product_ID
Ordered_Quantity
Product_Price
For entering ordered products there is a combo box for Product_ID which is displaying information about available products, their stock level, and price.
The Row source for Product_ID looks like this:
Code:
SELECT DISTINCTROW [qryStock4Orders].[Product_ID], [qryStock4Orders].[Product_name], [qryStock4Orders].[Available_quantity], [qryStock4Orders].[Selling_price] FROM qryStock4Orders ORDER BY [qryStock4Orders].[Product_name];
qryStock4Orders holds the calculated values of stock level (Available_quantity) for each product, grouped by Product_ID and Selling_Price. Selling_Price is from tblX.
Because I can buy one product from different suppliers (for different purchase prices) and purchase prices (so selling prices too) of the same product may vary over time, qryStock4Orders may list more then 1 available Selling_Price for that product, for example:
Product_ID Product_name Available_quantity Selling_Price
123 Product xyz 12 25$
123 Product xyz 42 29$
123 Product xyz 8 30$
What I want to achieve is to turn this code placed on After Update event of Product_ID combo box
Code:
Dim strFilter As String
strFilter = "Product_ID = " & Me!Product_ID
Me!Product_Price = DLookup("Selling_Price", "tblX", strFilter)
in something usable, in order to save into tblOrderDetails the selected Selling_Price and not one random Selling_Price from the 3 available above.
As the stock level is updated only after Ordered_Quantity and Product_Price are entered manually, what I'm trying to do with the code above is to automate the data input into Product_Price field of tblOrderDetails.
View 3 Replies
View Related
Nov 13, 2013
I am in the beginning of setting up a database and have NOT messed with multiple tables. I just want to make sure that I am setting up the tables as well as the relationships correctly.Here is what I currently have, 4 tables and they are named. Employee, phone, radio and spotter. Employee table is where my primary key is located and I currently have a 1-to-many relationship between Employee and the others.
What I want to be able to do is to store information in the multiple tables from 1 form, which I don't think will be an issue and then at a later date be able to pull up information. EX.Thus being able to skip anything being put into the spotter table. Then at a later date be able to pull up only the select information I originally put it?
View 5 Replies
View Related
Oct 24, 2013
I am using the IIf function as follows
Exp1:IIf(field A = "a string value",1,0) this returns the correct value.
However when I try to add a second condition using the IIf function, or use the And Or condition, I do not get the correct value.
I am trying to get a value of 1 in the Exp:Col when field B has a value that is different from field A.
What is the correct syntax? What am I missing??
View 13 Replies
View Related
Sep 6, 2012
I have an Inventory DB Table called [EngData] that has a subform table called [Inventory]. I have in the subform a calculated text box that Sums three columns, StockQtyMade, StockQtySold and StockQtyShrink. This works perfectly.
On the Main form I have a calculated text box that references the subform calculated field. This also displays correct info.
On another Form I wanted other users to see the total stock on hand by using a calculated field called PullTotalQty. This is set by using DSum(...). The only problem is that the DSum(...) keeps giving totals that are not accurate. Sometimes the quantity is a few pieces less then the correct amount and in other cases the qty is many times what it should be.
Whatever the amount in error it is consistent each time a particular record is displayed. I have tried many things to get this to work but nothing has fixed the issue. I have also tried changing the query and nothing works. Changing the query and using the [Inventory] table in the DSum domain gives a different wrong quantity.
Here is the code: I reduced the code down to one column to be summed (StockQtyMade) just to see if I could get that working first. I will add the other two columns later. for testing purposes I am only looking at the StockQtyMade amounts.
Me.PullTotalQty.Value = DSum("[tblInventory subform].[Form].[StockQtyMade]", "[SumStockQuery]", "[tblInventory subform].[Form].[PartID]= " & Me.[ID])
Here is the SumStockQuery SQL:
SELECT Inventory.TransactionID, Inventory.PartID, Inventory.PrintNo, Inventory.StockRev, Inventory.StockQtySold, Inventory.StockQtyMade, Inventory.StockQtyShrink, Inventory.StockQtyXIncomplete, Inventory.StockLoc, Inventory.TransactionDescription
FROM Inventory
WHERE (((Inventory.TransactionDescription)<>"xNextOP"))
ORDER BY Inventory.TransactionID DESC;
Why the totals are incorrect??
View 3 Replies
View Related
Jul 8, 2015
I have used the Data tab on a property sheet for a field in a report to build this expression (using expression builder) as the control source "=IIf([AllSchoolContacts].[Email]>" ",[AllSchoolContacts]![Email],[EmailAddress])" When I view the report I get the Enter Parameter Value dialog labelled AllSchoolContacts
I have added the fields to the expression using the expression builder the sources for the report are a table and a query in the REPORT.
The tables are AllSchoolContacts and Non Metro Query.
What I am trying to do is to have the record line show the email address for the organisation if the email address field in the AllSchoolContacts is blank.
View 1 Replies
View Related