Combobox Selection and Textfield in Detail form (1 Viewer)

silentwolf

Active member
Local time
Yesterday, 17:59
Joined
Jun 12, 2009
Messages
575
Hi guys,

I am just wondering how you go about following.

I got an Invoice Details form as a subform where I like to select "Services" I have done.

However what if I like to enter a one of in the Invoice Details form.

Meaning leave the Services out and enter in Description and Price without selecting any of the Services?

Can that be done or is it not a good practice?
Or should always a Service be entered?

And should you enter Units and Taxamounts in the Services table or in the InvoiceDetails Table?
At present I just left it in both will change it once I am sure where to put it.#

Attached just a small part of the structure.

Many thanks!!
 

Attachments

  • Services.JPG
    Services.JPG
    39.5 KB · Views: 76

CJ_London

Super Moderator
Staff member
Local time
Today, 01:59
Joined
Feb 19, 2013
Messages
16,616
What are units? Quantity? Box size? Something else?

also tax amounts? A percentage? A value?

as to including service- depends on you relationship rules

with regards where to store - definitely in the invoice detail, rates change over time and the invoice being a legal document needs to be reproducible at any time in the future. One of the few occasions where storing data twice is advisable
 

silentwolf

Active member
Local time
Yesterday, 17:59
Joined
Jun 12, 2009
Messages
575
What are units? Quantity? Box size? Something else?
Just hour or piece
TaxAmount is the tax rate

Services is just something we did like Servicehour or some kind of Product we use for billing.

One of the few occasions where storing data twice is advisable
So take it out of the Services..
So in Services you would just have a description on what has been done..

And how would you go about entering something on the fly so without haveing always edit the Service Table if there is one off "Service"

Or would you never do something like that?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:59
Joined
Feb 19, 2013
Messages
16,616
So take it out of the Services.
not necessarily, different services may be subject to different tax rates - and you have to store the tax rate somewhere - may be more appropriate there rather than a 'taxRate' table. Also depends on where you are but if talking about sales tax, the rules on when, where and how it is calculated can be different.

And how would you go about entering something on the fly so without haveing always edit the Service Table if there is one off "Service"

Or would you never do something like that?
As I said, depends on your rules. If you are enforcing integrity you probably need something there, but you can have orphan records providing the parent is not specified (i.e. nulls are allowed) - and if specified the parent must already exist. But since a null effectively means 'no parent', you could just have a 'sundry' parent
.
 

silentwolf

Active member
Local time
Yesterday, 17:59
Joined
Jun 12, 2009
Messages
575
not necessarily, different services may be subject to different tax rates
I am in Austria and still there are just two one tax rate in Services or Products. Every sold Item in my case is a rate of 20%
As I said, depends on your rules. If you are enforcing integrity you probably need something there,

I have my tables at present set up so they are with envorced integrety but left the 0 out in the properties.

you could just have a 'sundry' parent
hmm what does that mean sorry never heard of it is like when I have the 0 left out? Is that what you mean?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:59
Joined
Feb 19, 2013
Messages
16,616
I don't know what you mean by ' it is like when I have the 0 left out?'

But perhaps 0 is your 'sundry' parent
 

silentwolf

Active member
Local time
Yesterday, 17:59
Joined
Jun 12, 2009
Messages
575
I mean when you delet the 0 on the Property Sheet

Attached
 

Attachments

  • Null.JPG
    Null.JPG
    36.2 KB · Views: 70

CJ_London

Super Moderator
Staff member
Local time
Today, 01:59
Joined
Feb 19, 2013
Messages
16,616
yes - leave default value blank and set the required property to No

Field should also be indexed and in the indexing button on the ribbon, set the ignore nulls to yes
 

silentwolf

Active member
Local time
Yesterday, 17:59
Joined
Jun 12, 2009
Messages
575
yes - leave default value blank and set the required property to No
ok
Field should also be indexed and in the indexing button on the ribbon, set the ignore nulls to yes
On the FK Fields you mean?

PrimaryKey remains as No right?
 

Users who are viewing this thread

Top Bottom