PC Review


Reply
Thread Tools Rate Thread

Setting up credit notes

 
 
=?Utf-8?B?RnJhbmMgU3V0aGVybGFuZA==?=
Guest
Posts: n/a
 
      31st Jul 2007
Hi,

I'm making a sales and invoicing system, but I'm struggling with the credit
notes.

So far, I have set up the sales orders and sales order lines in two separate
tables.

Same with the credit notes, and credit note lines.

The credit note is based on a sales order, but doesn't necessarily contain
all the same lines as there were in the sales order. Therefore, I need to
pull through a copy of the sales order lines into the credit note lines, and
then edit from there.

How do I pull a copy of the sales lines for a particular sales order through
into the relevant credit note lines table associated with the original sales
order?

Thanks,

Franc.
 
Reply With Quote
 
 
 
 
John Nurick
Guest
Posts: n/a
 
      31st Jul 2007
Hi Franc,

Use an append query. Probably you'll need to write VBA code to
assemble and execute the necessary SQL statement, which could look
something like this:

INSERT INTO CreditNoteLines (
CreditNoteID, SalesOrderID, PartNumber, Description,
Quantity, UnitPrice, Tax)
SELECT '2345' AS CreditNoteID,
SalesOrderID, PartNumber, Description,
Quantity, UnitPrice, Tax)
FROM SalesOrderLines
WHERE SalesOrderID = '9876'
;




On Tue, 31 Jul 2007 08:42:05 -0700, Franc Sutherland
<(E-Mail Removed)> wrote:

>Hi,
>
>I'm making a sales and invoicing system, but I'm struggling with the credit
>notes.
>
>So far, I have set up the sales orders and sales order lines in two separate
>tables.
>
>Same with the credit notes, and credit note lines.
>
>The credit note is based on a sales order, but doesn't necessarily contain
>all the same lines as there were in the sales order. Therefore, I need to
>pull through a copy of the sales order lines into the credit note lines, and
>then edit from there.
>
>How do I pull a copy of the sales lines for a particular sales order through
>into the relevant credit note lines table associated with the original sales
>order?
>
>Thanks,
>
>Franc.

--
John Nurick - Access MVP
 
Reply With Quote
 
=?Utf-8?B?RnJhbmMgU3V0aGVybGFuZA==?=
Guest
Posts: n/a
 
      1st Aug 2007
Hi John,

That looks good. An earlier respondee came up with a similar Insert Into
SQL statement solution for this question. I'll be trying this out for sure.

Many thanks,

Franc.

"John Nurick" wrote:

> Hi Franc,
>
> Use an append query. Probably you'll need to write VBA code to
> assemble and execute the necessary SQL statement, which could look
> something like this:
>
> INSERT INTO CreditNoteLines (
> CreditNoteID, SalesOrderID, PartNumber, Description,
> Quantity, UnitPrice, Tax)
> SELECT '2345' AS CreditNoteID,
> SalesOrderID, PartNumber, Description,
> Quantity, UnitPrice, Tax)
> FROM SalesOrderLines
> WHERE SalesOrderID = '9876'
> ;
>
>
>
>
> On Tue, 31 Jul 2007 08:42:05 -0700, Franc Sutherland
> <(E-Mail Removed)> wrote:
>
> >Hi,
> >
> >I'm making a sales and invoicing system, but I'm struggling with the credit
> >notes.
> >
> >So far, I have set up the sales orders and sales order lines in two separate
> >tables.
> >
> >Same with the credit notes, and credit note lines.
> >
> >The credit note is based on a sales order, but doesn't necessarily contain
> >all the same lines as there were in the sales order. Therefore, I need to
> >pull through a copy of the sales order lines into the credit note lines, and
> >then edit from there.
> >
> >How do I pull a copy of the sales lines for a particular sales order through
> >into the relevant credit note lines table associated with the original sales
> >order?
> >
> >Thanks,
> >
> >Franc.

> --
> John Nurick - Access MVP
>

 
Reply With Quote
 
=?Utf-8?B?RnJhbmMgU3V0aGVybGFuZA==?=
Guest
Posts: n/a
 
      1st Aug 2007
Hi John,

I'm nearly there. I don't understand what I should be substituting in for
the '2345' in the SELECT '2345' AS statement below?

Thanks,

Franc.

"John Nurick" wrote:

> Hi Franc,
>
> Use an append query. Probably you'll need to write VBA code to
> assemble and execute the necessary SQL statement, which could look
> something like this:
>
> INSERT INTO CreditNoteLines (
> CreditNoteID, SalesOrderID, PartNumber, Description,
> Quantity, UnitPrice, Tax)
> SELECT '2345' AS CreditNoteID,
> SalesOrderID, PartNumber, Description,
> Quantity, UnitPrice, Tax)
> FROM SalesOrderLines
> WHERE SalesOrderID = '9876'
> ;
>
>
>
>
> On Tue, 31 Jul 2007 08:42:05 -0700, Franc Sutherland
> <(E-Mail Removed)> wrote:
>
> >Hi,
> >
> >I'm making a sales and invoicing system, but I'm struggling with the credit
> >notes.
> >
> >So far, I have set up the sales orders and sales order lines in two separate
> >tables.
> >
> >Same with the credit notes, and credit note lines.
> >
> >The credit note is based on a sales order, but doesn't necessarily contain
> >all the same lines as there were in the sales order. Therefore, I need to
> >pull through a copy of the sales order lines into the credit note lines, and
> >then edit from there.
> >
> >How do I pull a copy of the sales lines for a particular sales order through
> >into the relevant credit note lines table associated with the original sales
> >order?
> >
> >Thanks,
> >
> >Franc.

> --
> John Nurick - Access MVP
>

 
Reply With Quote
 
John Nurick
Guest
Posts: n/a
 
      1st Aug 2007
Hi Franc,

You must have a field in your CreditNoteLines table that links each
line item to the 'parent' record in the CreditNotes table. Presumably
by the time you're ready to create the CreditNoteLines records you
have created a record in CreditNotes for the credit note that the user
is creating; you need the primary key value of that record.

On Tue, 31 Jul 2007 23:20:02 -0700, Franc Sutherland
<(E-Mail Removed)> wrote:

>Hi John,
>
>I'm nearly there. I don't understand what I should be substituting in for
>the '2345' in the SELECT '2345' AS statement below?
>
>Thanks,
>
>Franc.
>
>"John Nurick" wrote:
>
>> Hi Franc,
>>
>> Use an append query. Probably you'll need to write VBA code to
>> assemble and execute the necessary SQL statement, which could look
>> something like this:
>>
>> INSERT INTO CreditNoteLines (
>> CreditNoteID, SalesOrderID, PartNumber, Description,
>> Quantity, UnitPrice, Tax)
>> SELECT '2345' AS CreditNoteID,
>> SalesOrderID, PartNumber, Description,
>> Quantity, UnitPrice, Tax)
>> FROM SalesOrderLines
>> WHERE SalesOrderID = '9876'
>> ;
>>
>>
>>
>>
>> On Tue, 31 Jul 2007 08:42:05 -0700, Franc Sutherland
>> <(E-Mail Removed)> wrote:
>>
>> >Hi,
>> >
>> >I'm making a sales and invoicing system, but I'm struggling with the credit
>> >notes.
>> >
>> >So far, I have set up the sales orders and sales order lines in two separate
>> >tables.
>> >
>> >Same with the credit notes, and credit note lines.
>> >
>> >The credit note is based on a sales order, but doesn't necessarily contain
>> >all the same lines as there were in the sales order. Therefore, I need to
>> >pull through a copy of the sales order lines into the credit note lines, and
>> >then edit from there.
>> >
>> >How do I pull a copy of the sales lines for a particular sales order through
>> >into the relevant credit note lines table associated with the original sales
>> >order?
>> >
>> >Thanks,
>> >
>> >Franc.

>> --
>> John Nurick - Access MVP
>>

--
John Nurick - Access MVP
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
where can i find credit notes annatjie Microsoft Excel Misc 0 17th May 2010 10:31 AM
Setting up credit notes =?Utf-8?B?RnJhbmMgU3V0aGVybGFuZA==?= Microsoft Access Form Coding 5 2nd Aug 2007 03:24 PM
Setting up credit notes =?Utf-8?B?RnJhbmMgU3V0aGVybGFuZA==?= Microsoft Access 2 1st Aug 2007 12:52 AM
Invoice and Credit Notes craig Microsoft Excel Worksheet Functions 0 16th Mar 2005 06:53 PM
Invoice and Credit Notes craigoutinoz@hotmail.com Microsoft Excel Worksheet Functions 1 1st Mar 2005 02:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:53 PM.