Solved

Insert a line in a continuous form (instead of adding it at the end)

Posted on 2013-02-06
8
317 Views
Last Modified: 2013-02-13
I have an invoice entry form that has a subform on it to hold all of the invoice lines. My client often adds comments about a particular invoice line immediately after that line of the invoice (entering comments as their own invoice lines). They often enter comments for several different items on the invoice.

Can someone recommend a code sample that would allow me to insert a blank line in the invoice detail lines wherever the client needs to (rather than just at the end)?

At the moment, my plan is to write code to move all the lines after the insert point down. But before I re-invent the wheel, I was wondering if there was something out there for this already.

Thank you!
0
Comment
Question by:jrmcanada2
  • 4
  • 3
8 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 38863003
I think what you are describing would be extremely difficult to do.

I would suggest that you think about having a pop-up form that just contains a memo field (and sufficient line ID fields) and the user can add comments into this.  The comments field would be part of the invoice line record, but not visible in the subform.

You could display the pop-up by say, double-clicking one of the controls in the detail lin.
And you could use conditional formatting of that contro to have different colour background depending on whether the memo field was empty or not.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38864523
Agree with Pete...

Are you asking for this functionality specifically (Inserting blank rows)...?
Because inserting "blank lines" is not something that is done in a standard Database...)

Sometimes it is best to state your ultimate need, then experts can suggest solutions.

So to be clear, are you seeking "one" comment per Invoice, ...or one comment per invoice line Item (Product)?

Perhaps I am not understanding, but why not just add a "Comments" field to the corresponding table(s)?

JeffCoachman
0
 

Author Comment

by:jrmcanada2
ID: 38864743
Hi,

Thanks for your input.

If the whole process were entirely up to me, I'd do it differently. But the client has very exacting demands about how they want the invoices to be entered and printed.

For simplicity, lets ignore comments and blank lines. The client's demands include wanting to put the detail lines in exactly the order they desire. (Due to the nature of their business, the order is relevant and the invoice would be confusing/baffling if the lines were not in a specific order.) So if they have 15 lines entered and realize that they missed one, they want to be able to add it but they want to be able to add it in the place of their choosing.

Hence the need to be able to insert a line rather than just add it to the end.

James
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38864831
The client may have: "very exacting demands about how they want the invoices to be entered and printed."
...but they should not dictate "How" the developer goes about actually achieving those requirements...
;-)

You can "Sort" records in any order you like.

So if a Client has Four "Lines"
Design
Build
Test
...Then they want to add a fourth item: "Approve", ...to be under "Design".

You can create a "Sort" field, where they enter a "Position" where they want each record.
Then you can Sort by this field.
So this:
1. Design
2. Build
3. Test
...Becomes this:
1. Design
2. Approve
3. Build
4. Test
...by the user changing the "sort" value field.

(Obviously here you may want to create a system so that a sort number cannot be duplicated, but this is another concern...

JeffCoachman
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38866593
If this is what you needed then I can work up a sample database
0
 

Accepted Solution

by:
jrmcanada2 earned 0 total points
ID: 38866600
Thank you very much, Jeff. Really ... that's a VERY generous offer. But I think I will spare you the time it would take. I'm going to add my own sequence number to each record and just renumber them as needed.

Thank you for your input, though!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38866737
ok

;-)
0
 

Author Closing Comment

by:jrmcanada2
ID: 38883777
It's clear that this is an uncommon request, so no currently-existing solution is likely.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now