Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2008
    Posts
    5

    Unanswered: confused with relationships

    Hi all,
    I'm new in this forum, and actually new in programming.
    I'm trying to make access prog for a shop,
    while making invoice query with relationship of tbls, got a problem with it as shown in figure attached.

    can any one help me with this. and if there is something missed in there!

    also I'm looking for invoice code....
    Attached Thumbnails Attached Thumbnails query.jpg  

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    You are very confused - those are joins not relationships

    Make the join from tblInvoiceDetail to tblBrand an OUTER JOIN not an INNER JOIN.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Apr 2008
    Posts
    5
    thanks pootle flump,

    I've made it..... but it gives me warning not when runing it

    " Type mismatch in expression"

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Are brand ID the same data type in both tables? If so - please post another screenshot. Otherwise fix.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    take a step out and define relationships first.. that shoudl get you more credits in your assessment
    use the relationship manager (tools | relationships in office XP)

    correctly define relationships between each entitiy, enforce RI (realtional Integrity

    unless its transient data, don't allow delete cascade, but do allow delete change/update.

    for realtionships to be defiend the data types inthe respective columns MUST be the same, and must be unique in one table.
    eg if you had a table called products and product types then the product type MUST be unqiue in the producttypes table

    a relationship can comprise several fields/columns

    then come back to your query design......

    get the data design right and the rest of the application is failry straightforward, make a mess of the design and you have to start udoing work (never nice) or going through hoops tryign to coerce what you need from the data model you've got... if it isn't easy to express in SQL then almost certainly your data is not properly designed (at least at this sort of size of DB, real world applications can have mind bending;y tortuous SQL but that shouldn't be an issue here

  6. #6
    Join Date
    Apr 2008
    Posts
    5
    thanx again pootle flump,

    It was all Text Type....

    now it works as well.

    and now can you or any one help me find code for this invoice .... in that there is down payment and in the other day the customer complete the payment >>>>

    and are there some fields shoud be added in those tbls...

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    a payment is a separate entity to an invoice, a payment may refer to more than one invoice, a payment may be postiive (ie cash received), or it may be negative (a refund). when a payment is received you need to identify what invoice(s) its assopciated with, or find some other mechanism to identify what the customer has actually paid for. if a customer disputes an invoice or part thereof you need to have some mechanism to identify what has been paid or what is disputed..


    a deposit is in effect a prepayment on an item... I'd be minded to record it as a payment received without specifically allocating it to an invocie... generating an invoice has a very specific meaning (at least in UK terms the date of invoice is the date the VAT clock starts running, you invoice you owe VAT)
    I'd rather be riding on the Tiger 800 or the Norton

  8. #8
    Join Date
    Apr 2008
    Posts
    5
    Quote Originally Posted by healdem
    take a step out and define relationships first.. that shoudl get you more credits in your assessment
    I've been done defining relationships

    ............

    for the payment and invoice,
    actually it is for optical shop, so sometimes a customer will give downpayment and after eyeglasses finished he will complete the payment

    did you mean (healdem) that I should make a seperate tbl for payment and make a joint with the invoice!!!

  9. #9
    Join Date
    Apr 2008
    Posts
    5
    can someone help me to solve this trick in invoice?????


    pleassssssssssss

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •