Solved

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

Posted on 2013-02-06
8
322 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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
 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

734 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