Solved

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

Posted on 2013-02-06
8
318 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Format vertical text in Access 2016 3 31
Unrecognized Database Format 8 90
Run Time Error 3075 15 43
I need to be able to get MAX(date)-1 from table. 4 25
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

914 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

18 Experts available now in Live!

Get 1:1 Help Now