Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-02-06
8
Medium Priority
?
325 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

972 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