+ Reply to Thread
Page 2 of 2 FirstFirst 2
Results 201 to 307 of 307

Populating forms with new or existing data and saving to a data sheet.

  1. #201
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I'm affraid the trick of using a combobox as a button (Save-and-close or Save-and-new) isn't such a good idea afterall. Will try to figure out something alike.
    Late last night it started working had something to do with one of the "Save and close" or the "Save and new". I retype and it started working on my version anyway! Btw: it didn't fix the color background problem if thats part of what your talking about!

    Easiest (and most appropriate) way to do that is that have the DoubleClick event respond to double-clicking the Owners column. Then Target will automatically contain the UnitOwner.
    Sounds good!

    I will keep plugging away making some design changes will have a version for you to look at tomorrow I hope!

    I try to give you "Reputations" every time! It just refuses, sorry!

    Thanks

    u3rick
    Last edited by u3rick; 11-04-2015 at 06:23 PM.

  2. #202
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I have made big changes for the better I think in the worksheet OwnersPayables. I have two problems, 1 when I did away with the multipage frmTransaction it couldn't show the cboAction list for each transaction Invoice, Credit memo, Check, and Payment. So, I tried the code below to do the same thing and no luck! It keeps wanting an Object and I can't find one that works. Help! I am sure its way more complicated than this code.

    Please Login or Register  to view this content.
    Next thing is, I needed a way to post the numbers as + and - to the transactionList (In this latest version I did away with the sheets, Invoices, CreditMemo's, Checks, and Payments) I used the following code which works except for one problem on the "Save and new" I will show the code and the error below.

    Please Login or Register  to view this content.
    When I close with Save and new I get the following error. It does record the transaction but won't bring the form back cleared

    Screen Shot 2015-11-05 at 9.33.21 AM.png
    Screen Shot 2015-11-05 at 9.33.43 AM.png

    I will put the file in Dropbox its messy because I am behind and just in the middle of the redo, sorry"

    Thanks

    U3rick

  3. #203
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Allocating the rowsources should be done like this:
    Please Login or Register  to view this content.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  4. #204
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Can't believe I got that close and couldn't figure it out! I stayed up till 1 am!

    Most likely not enough beer!

    Thanks

    u3rick

  5. #205
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    About this invalid procedure call.
    This is what happens when you click the "Save-and-New" button:
    1. The procedure cboClose_Click will be fired
    2. At the end of this procedure the Transaction form (frmTransNew) will be initialized
    3. Part of the initialization is making cboAction empty
    4. This will trigger the cboAction_Change event to be fired (feel 'm coming?)
    5. In this procedure the Memo text attached to the service in cbo_Action will be looked up
      But cboAction is empty! So the lookup will give no result and so RecIdx will have an error code (error 2042) instead of a record number
    6. Reading from the Services table with this RecIdx will cause the error: Invalid procedure call
    Capice?
    So actually you shouldn't want the cboAction_Change event being fired.
    Do notice that you cannot disable form events. The command Application.EnableEvents only enables/disables worksheet events.
    That's where this public variable FormEventsEnabled comes in.
    By setting the FormEventsEnabled variable to False (right before you change cboAction) and in the cboAction_Change procedure testing on this variable before executing the code (IF...THEN) will prevent the event procedure from being executed.
    Don't forget to set the FormEventsEnabled variable back to True after the cboAction is changed.

    You should use this technique everywhere you don't want form events to be fired (read: executed).

  6. #206
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Thanks, it was driving me crazy. I still am having a hard time recognizing the firing order. as well as Public and Private. But I feel i am improving!

    u3rick
    Last edited by u3rick; 11-06-2015 at 12:58 PM.

  7. #207
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    But I feel i am improving!
    You are

  8. #208
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I am having a problem with the cboType box. It will error when a blank row is clicked on in the pull down menu. The blanks are there because of the number of rows (20) in the ServiceList table. The error is one we have seen before and is the fault of

    Please Login or Register  to view this content.
    It is seeing a blank and errors before the red box shows letting you know its blank.

    The fix would be to limit the table rows for each list used from the tables sheet to the number of items in the lists, but it won't because of the 20 rows in the SeviceList table. I also tried to set the ListRows in the code but no luck.

    I could make a table for each transaction type but that also causes problems as i see it?

    What do you think is the best fix path?

    Put latest version in Dropbox OwnerPayables v.5.2.1

    Thanks

    u3rick

  9. #209
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    This should do the trick:
    Please Login or Register  to view this content.
    BTW, I posted the diagram with the Main Proces Flow to the dropbox

  10. #210
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Thanks, I will look at it this afternoon!

  11. #211
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I know you’re not going to believe this, but I ran into another problem! In the form OwnersPayableActivity in the list box area I have two list boxes. One has 5 columns and the other one has one. I had to divide them for formatting the Totals column with justify right and $ signs. So when you wrote the code for the double click sub to fill the frmTranactions takes place. It is missing values for two columns, Actions and Totals. This makes it pretty much useless at this point.

    Screen Shot 2015-11-06 at 7.20.25 PM.png

    I would like to get the information from the TransactionList Table. Is there a way to match the NO. column on the lstTransaction box to the Number column on the TransactionList. I was trying something like this,

    Please Login or Register  to view this content.
    This is not working yet, but is the template I was using to get to the end result. I am not sure if the info in the list box can be used here or do you have a better idea

    Screen Shot 2015-11-06 at 7.42.08 PM.png

    Thanks as always

    u3rick

  12. #212
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    In the properties of the lstTransactions list add a 5th column (ColumnCount = 5) to make room for the Action in the lstTransactions list
    and set the last column width to 0 so it doesn't show in the frmOwnersPayableActivity.

    Then - in the sub GetOwnerTransactionList - add the following lines to read the Action into the lstTransactions list
    Please Login or Register  to view this content.
    Now - when double clicking the list - the action will be available in the sub lstTransactions_DblClick

    To use it there add the following line:
    Please Login or Register  to view this content.
    Also notice that when getting the total from the lstTransTotals list the index of the lstTransactions list is used. That's the link between the two lists.

    BTW, I uploaded the working version of ES Reservation_v3.0.02.xlsm to the dropbox.
    Last edited by Tsjallie; 11-07-2015 at 03:56 PM.

  13. #213
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Way easier than I thought! Of course if you don't know it's still hard!

    Thanks so much!

    u3rick

  14. #214
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Here are some code templates as promised.

    Form event
    Please Login or Register  to view this content.
    Read data from a table
    Please Login or Register  to view this content.
    Update data in a table
    Please Login or Register  to view this content.
    Delete data in a table
    Please Login or Register  to view this content.
    Insert data in a table
    Please Login or Register  to view this content.
    The templates above assume that the RecId is a unique identifier selecting precisely one row in the table.

    If the selection criteria would select none or multiple rows in the table an other approach is needed.
    Unfortunately now it's time for my beer.
    So to be continued ...

  15. #215
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Just had one myself !!

    I will copy these into my template file program (Word)

    Have many beers its the weekend!

  16. #216
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Sub ProcedureName(RecId as ......., parm2 as ......, .....)
    Can you give me some examples of what goes in the above? Mostly where the dots are!?

    Update: All I get is red letters when I try setting this up in workbook, so I am sure I am miss something or doing some wrong (Don't forget I don't know much)!

    RecIdx = application.match(RecId, .ListColumns("IdColumn").DatabodyRange, 0)
    FrmName.ObjectName = .ListColumns("DataColumn").DatabodyRange(RecIdx)
    Are both the names in red shown above related to the Table(Worksheet)?

    Also, I put the latest version in dropbox. When you have it opened Right click unit BBH 5125 then click Owner Detail tab then edit. This is as far as I got, I tried some of the template code but couldn't get the information to fill in from the Owners Table. Take a look and tell me how I should have done it please!

    Thanks

    u3rick
    Last edited by u3rick; 11-08-2015 at 10:55 AM.

  17. #217
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Here's an example of the template for reading data from a table.
    Words in red are substituted with the actual names to be used.

    Remember that there are multiple techniques to get this done. Some are better than others, but often it's also about personal preference.
    More important is to choose one and use that consistently.
    Something I myself am not very good in as you may have noticed
    Please Login or Register  to view this content.

  18. #218
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I agree with keeping things the same and uniform, it helps me understand it easier!:roll eyes: I will work on this now that I see what goes where. It funny though every time I do a procedure it seems to have something slightly different that throws me totally off. Thats why I have questions everyday!!


    Thanks

    u3rick

  19. #219
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Can you figure out why the first code I show here works and the second won't? They are making Ids for different forms.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I have attached the workbook and uploaded to Dropbox

    Thanks

    u3rick
    Attached Files Attached Files

  20. #220
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    frmOwnerInfo("ChkNewOwner") should be frmOwnerInfo.ChkNewOwner

  21. #221
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Thanks for the code correction! After fixing it the main problem is still there. I may not have explained it very well in post 219. When form Owner Info comes up it always shows OwnerId 1000036 and the OwnerId's in the table stop at 1000036. The code used for populating both id#'s is the same, but in the form Owner Info it is not working and in the form NewTrans it is working.

    u3rick

  22. #222
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Ok, didn't get that yet.
    Here's what happening:
    in the cmdSave_Click() procedure of frmOwnerInfo you're storing the OwnerId as text where the Max-function calculates the highest numeric value which is the ownerid in the previous record (1000035).
    So
    Please Login or Register  to view this content.
    should be
    Please Login or Register  to view this content.

  23. #223
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Thanks!!

    Been trying to fix that for about 5hrs!!

  24. #224
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Changed everything and on mine it still comes up 1000036?

  25. #225
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    That's probably, because the last ownerid is still stored as tekst.
    Just open the cell containing the last ownerid and press [Enter] to close it again.
    That should make Excel store it as number. At my end that is.

  26. #226
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Finally its working!!

  27. #227
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    1) When I copy to a table row, do I leave blanks if no info is available or make a NA post?

    2) Best way to save after each posting to make sure the record is saved? (Our default method we use throughout this workbook)

    Thanks

    u3rick

  28. #228
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    You need to give me some more background on this. Guess you're talking about the file exchange to/from Lodgix?
    Where would you be copying the table rows to?
    There are several techniques to make sure you have stored what you received. But also depends on how the data is delivered and in which volumes.
    You could save the whole workbook after each record or you could save the workbook at the end after checking everything is there.
    A procedure to recover if something went wrong is also a way to go.
    In short the best technique to use largely depends on the criticallity of the data, the delivery technique, time dependency etc
    If this is about exchanging data with Lodgix, is there some kind of manual on these matters which you could upload?

  29. #229
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Sorry! I didn't explain it well. I was talking about when data is copy to a table(Sheet) within the current workbook. Like Invoices Credits etc., and I want it to be saved as unloaded. Otherwise if you crash or close while not thinking about it the data will be missing and lost. I have not started on Lodgix yet will do manually at first.

    u3rick
    Last edited by u3rick; 11-11-2015 at 07:53 PM.

  30. #230
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    .... data is copy to a table(Sheet) within the current workbook...
    Maybe I'm missing something, but wouldn't that normally be done by formulas in the target sheet (or table) referencing cells in the source sheet (or table)?

    Anyhow, saving the workbook after each row is copied will be killing for performance.
    Is there an example of this issue in the workbook? Can you point me to that so I can have a closer look.

  31. #231
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    And one other thing for you to consider about deleting records.
    In a system I developed years ago for my company and where auditing is top priority, I didn't fysically delete or overwrite any (important) records but just deactivated them.
    This gave a very nice audit trail showing a complete history of all changes made to these records.
    It was implemented by just adding 3 columns to each important table: Active_YN, Date, User and - of course - have the procedure handle updates and deletes accordingly.
    Such a table could like something like this:
    OwnerId FirstName LastName Active_YN Date User
    1000035 John Doe N 11/09/2015 Tsjallie
    1000035 Jane Doe N 11/10/2015 Tsjallie
    1000035 Joe Doe Y 11/11/2015 Rick
    Consequence of this approach however, is that you would always need multiple criteria for a unique identifier, but that shouldn't be very exciting.
    Major pro's of it would be that it would offer you the possibility to rollback changes and you won't need additional change logging.
    It's just a thought I didn't want to keep from you.

  32. #232
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Maybe I'm missing something, but wouldn't that normally be done by formulas in the target sheet (or table) referencing cells in the source sheet (or table)?
    What happens if you enter info into the Userform then insert that data into a table and then you close without saving? is the data in the receiving table still there?

    I do want to implement post# 231, do I add the needed columns to all tables? I think most tables have date and some have Active?
    Last edited by u3rick; 11-13-2015 at 12:39 AM.

  33. #233
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    If you close the workbook without saving it all changes made since the last time it was saved will be lost.
    You can prevent this by forcing Excel to automatically save the workbook when it's closed.
    Enter this event code into ThisWorkbook codemodule:
    Please Login or Register  to view this content.
    But be aware that the workbook will also be saved when unwanted.

  34. #234
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    I do want to implement post# 231 do I add the needed rows to all tables I think most have date and some Active?
    The date could be used, but the Active column you're using has an other meaning.
    Better call the column Deleted_YN and have "Y" in it when deleted and "N" when not.
    To do the lookups with still one criteria you could add yet another column concatenating the Id and the Deleted_YN column making it a unique identifier.
    So (e.g) with the Owners table in this column you would get a value "1000035N" for the active record and "1000035Y" for any deleted record.
    Looking up the Owner could then be done with the value (e.g.) txtOwnerId & "N".
    Notice that in this case you would be surging a column with text value, so you would not have to convert the OwnerId to the numeric value with cdbl(txtOwnerId).

    I wouldn't implement this in all tables, just the ones you think are important to audit.

  35. #235
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    But be aware that the workbook will also be saved when unwanted.
    That could be a pain for us, but don't you think that is preferable for End Users?
    Last edited by u3rick; 11-12-2015 at 04:24 PM.

  36. #236
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Where do I pickup the User in post #31

  37. #237
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Could you take a look at version 5.2.10 and tell me why the form box txtFName is not turning red when tabbed when blank? Also run from the new Owner button and check code this might not be the best way to do this if there is a better way let me know?
    This is because the background style of the textbox is set transparant.
    Add this line:
    Please Login or Register  to view this content.
    Or just set the BackStyle in the properties of the textbox

  38. #238
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Where do I pickup the User
    Application.Username will return the user.

  39. #239
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    That could be a pain for us
    I certainly wouldn't turn this on while developing the workbook

  40. #240
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    This is because the background style of the textbox is set transparant.
    Lool! I am so smart!!

    Thanks

  41. #241
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I am working on the design stuff u sent, but its a lot to answer so may take a couple of days to upload my version!

  42. #242
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    .... but its a lot to answer so may take a couple of days to upload my version!
    And this is only a start. My time has come to make your life miserable with all kind of nasty questions and chalenges
    But, somehow I feel your gonna surprise me!

    Take your time. A proper design will save you an awful lot of time later!

  43. #243
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I wouldn't implement this in all tables, just the ones you think are important to audit.
    I will include on tables that originate an Id# or Transaction# for starters.

    Yes this is getting to be a large project!!

    u3rick

  44. #244
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    So (e.g) with the Owners table in this column you would get a value "1000035N" for the active record and "1000035Y" for any deleted record.
    Do I use the OwnerId or the OwnerDeleteId as well as PropertyId or PropertyDeleteId to makeup thePropertyOwners table? Guess I could use all of them?

    u3rick

  45. #245
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    This unique identifier is the Primary Key of a table plus it's Deleted_YN column.
    Because in the PropertyOwner table (as it was originaly) OwnerId and PropertyId together make up the Primary Key the unique identifier would be OwnerId & PropertyId & Deleted_YN.
    Lookup would be done with (e.g.) txtOwner & txtPropertyId & "N".

  46. #246
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Take a look at the Property Owner table and see if thats the way it should be setup? I have put v5.2.12 in the Dropbox and will include as attachment here.

    Thanks

    u3rick
    Attached Files Attached Files

  47. #247
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Yep, that's what I mean.
    One small change though:
    Please Login or Register  to view this content.
    should be (no need for the quotes)
    Please Login or Register  to view this content.
    For readability you could also add dashes between the 3 fields
    Please Login or Register  to view this content.

  48. #248
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    got it

    Thanks

  49. #249
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Could you help me figure out the Right click and double click on the OwnersPayableList sheet. I tried to redo with out using UnitOwner as Identifier. Not much luck! (v5.2.14)
    Worksheet_BeforeRightClick
    • frmOwnersPayableActivity.txtOwnerId = Target -> This will fire the Userform_Initialize() procedure of frmOwnersPayableActivity
    • When the Userform_Initialize() procedure is excuted the OwnerId will not yet have arrived at the txtOwnerId. So txtOwnerId will still be empty.
    • Therefore you need to move the call to FillOwnerInfoOPA to a txtOwnerId_Change() procedure.

    Also the FillOwnerInfoOPA expects the OwnerId as a numeric value (double).
    So the call should be
    Please Login or Register  to view this content.
    FillOwnerInfoOPA
    • Me.txtUnitOwner = .ListColumns("UnitOwner").DataBodyRange(Recidx) -> This will fire the txtUnitOwner_Change() procedure
    • The txtUnitOwner_Change() procedure will call the FillOwnersPayablePage() procedure with the txtUnitOwner
    • In the FillOwnersPayablePage() procedure the PropertyOwners table is filtered on column 3 (= PODUniqId) with the UnitOwner.
    • So
      Please Login or Register  to view this content.
      should be
      Please Login or Register  to view this content.
    • Me.txtOwnerAddress = .ListColumns("OwnerAddress").DataBodyRange(Recidx) give an error "subscript out-of-range"
    • This is because the column name should "AddressOwner"
    • frmOwnerPayableActivity.Show gives an error "object required"
    • This is because the name of the form is misspelled.
    • You can also remove the line frmOwnersPayableActivity.Show, because is aready shown in the Worksheet_BeforeRight() procedure

    GetOwnerTransList
    • .AutoFilter Field:=4, Criteria1:=UnitOwner -> will leave no rows
    • This is because UnitOwner contains a value "x BBH 5125/Frabasilio, Ron", where the UnitOwner column in the table has a value "x BBH 5125/Frabasilio, Ron".
    • The value in the table has an extra space between x and BBH
    Last edited by Tsjallie; 11-14-2015 at 05:51 PM.

  50. #250
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Forgot I changed all the Columns, it was late!!

    Thanks

  51. #251
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Noticed an error in the lookups for the OwnerId, UnitOwner and Phone in the OwnerPayableList sheet.
    This is because
    • the INDEX-formula is referencing the sheet rows in the PropertyOwners table instead of the data rows
    • the part calculating the k-parameter in the SMALL-function should reference the header row of the OwnerPayableList table
    The formula for the OwnerId should be like this
    Please Login or Register  to view this content.
    The formula for the UnitOwner should be like this
    Please Login or Register  to view this content.
    The formula for the Phone should be like this
    Please Login or Register  to view this content.
    It are still array formulas, so close 'm with [Ctrl]+[Enter]

  52. #252
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Here is the Ledgers and Journals as handle in QB's. My thought is to set the ledgers in OwnersPayable worksheet the same, but need your guidance on this. Lot of hours of thinking and reading but no defined answer from me!

    General Ledger
    Screen Shot 2015-11-16 at 9.26.47 AM.png

    Journal
    Screen Shot 2015-11-16 at 9.35.33 AM.png

    Thanks

    u3rick

  53. #253
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tisjallie

    I copied the new formulas into OwnersPayableList sheet and the screen shot below is what the results were!?

    Screen Shot 2015-11-16 at 10.26.38 PM.png

    u3rick

  54. #254
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Sorry, my mistake.
    Please Login or Register  to view this content.
    should be
    Please Login or Register  to view this content.
    Last edited by Tsjallie; 11-17-2015 at 07:52 AM.

  55. #255
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I have put latest version in Dropbox and attached but looks like you have fixed.

    Update: Now it works fine!

    BTW: Could you look at the AdvancedDepositLedger in v5.2.16 and see if there is a formula that will keep a running balance for the whole acct. I assume I will need another column to get a running balances for each invoice #?? This is the ledger that will record the data from Lodgix AD report. I think if possible heroes where I need a button that could tell Lodgix to run the AD Report. Then it would copy the selected data to the AdvancedDepositLedger. This button would be run when Bank Deposits are posted to QB's by VBB staff. I think the correct posting for both accounting systems will be the (QB's 1010 Advanced Deposits gets debit and offset with credit 6900 Suspenses) (ManagementAccounting 6900 Suspenses get debit and 2100 Advanced Deposit Credit). The invoice will be track in the Management Systems accounting until Checkout date at which time the final posting to both clears the Suspense Acct's for that Invoice to 0.This leaves the 1010 Bank Account in QB's with Vacationville's portion of the revenue offset to proper Income acct. The Invoice History stays in the Management System where I think it belongs. Leaving QB's to Handle Vacationville's Income, Expenses, Payroll and Taxes and the management system to track all rental relate data.

    Thanks

    u3rick
    Attached Files Attached Files
    Last edited by u3rick; 11-17-2015 at 01:33 PM.

  56. #256
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    a formula that will keep a running balance for the whole acct. I assume I will need another column to get a running balances for each invoice
    You can calculate a running total per invoice with this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Calculating a running total for the account could be done with
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Both formulas will exclude any deleted records.

  57. #257
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    This is the ledger that will record the data from Lodgix AD report
    Can you post a sample of such a Lodgix AD report in the dropbox?
    If necessary anonomize the data.

    I think if possible heroes where I need a button that could tell Lodgix to run the AD Report
    Is there a command string which can be sent to Lodgix?

    Then it would copy the selected data to the AdvancedDepositLedger
    You could automate importing the data form the Lodgix AD report, but you can't do that in an Excel table (thk u Microsoft!).
    So that needs an additional trick.
    If you can post such report I can make up a example for that.

    Well I have a good Idea of where thin will be done, that is pretty much directed by the Programs (Lodgix, QB's).
    I mainly questioning the makeup of the accounting part of the management system, and the number of tables needed, what information to hold in those tables, etc.
    Can you check the functions listed in the functional decomposition of the CRUD-matrix in the VacationVille Adminstration Model.xlsx.
    Is that list complete? Which functions should be covered by in the Management System?

    It seems like QB's uses one huge table? Is that best for our purpose?
    Depends if it's still manageable in that layout. May be it's better to split it up in the Management System.
    If you need to generate an export file this can be collected from different table.
    Last edited by Tsjallie; 11-17-2015 at 04:32 PM.

  58. #258
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Can you post a sample of such a Lodgix AD report in the dropbox?
    If necessary anonomize the data.
    In dropbox, Advanced_Deposits_Report.xls

    Is there a command string which can be sent to Lodgix?
    Don't know but I will check that will take awhile they are slow.

    Can you check the functions listed in the functional decomposition of the CRUD-matrix in the VacationVille Adminstration Model.xlsx.
    Is that list complete? Which functions should be covered by in the Management System?
    I will look at that soon and get back to you.

    Depends if it's still manageable in that layout. May be it's better to split it up in the Management System.
    If you need to generate an export file this can be collected from different table.
    I am looking at three sub ledgers (AD, ES Reservations, OwnersPayable, and a General Ledger for Management System's accounting system.

  59. #259
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Found some interesting info here: http://docs.lodgix.com/m/5502/l/51950-financial-reports
    I would specially be interested in the Data Dump Report

  60. #260
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    I would specially be interested in the Data Dump Report
    it in dropbox Reservation_Dump (1).xls

  61. #261
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Didn't see the formulas, having a wind storm here so power went out causing my computer to quit and that intern messed up Parallels 7 windows 10 so can't use them yet!

    Thanks

    u3rick

  62. #262
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    =SOMPRODUCT(--([InvNo]=[@InvNo]),--([Deleted_YN]="N"),[Paid])
    worked good once I saw the SOMPRODUCT should be SUMPRODUCT...Lool!

    just part of my training!

  63. #263
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    SOMPRODUCT should be SUMPRODUCT
    I'll get my coat

  64. #264
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Lool!

    I have loaded version v5.2.18 in Dropbox and attached here, check out the AdvancedStaysLedger. I have tried to think of all angles what have I forgot!?
    Attached Files Attached Files

  65. #265
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Hate to spoil your fun , but the formulas in the Balance columns don't work correct.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Problem is this part:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This only returns 1 when Cancelled_YN and Completed_YN are equal. So either both TRUE or both FALSE, while it should only return 1 if Canceled_YN and Completed_YN are both "N".
    So the formula to work correctly should be
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BTW, what happened to Deleted_YN?

  66. #266
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629
    Quote Originally Posted by Tsjallie View Post
    Hate to spoil your fun , but the formulas in the Balance columns don't work correct.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Problem is this part:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This only returns 1 when Cancelled_YN and Completed_YN are equal. So either both TRUE or both FALSE, while it should only return 1 if Canceled_YN and Completed_YN are both "N".
    So the formula to work correctly should be
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BTW, what happened to Deleted_YN?
    Well we both know I don't know what I am doing!!👍 I change to Canceled.

    Thanks!

  67. #267
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    I'm looking at automatically updating the AdvancedDepositLedger sheet from the Advanced Deposits Report.
    Some questions about this AdvancedDepositLedger sheet:
    • Where do you get the Account from?
    • What are columns Dr and Cr (both copy the value of the column Paid)?
    • Where do you get the OffsetAccount from?

  68. #268
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Where do you get the Account from?
    It comes from the chart of accounts that both QB's and the management system use, the account are, "2100 Advanced Deposits" and 6900 Suspenses.

    What are columns Dr and Cr (both copy the value of the column Paid)?
    Dr =Debits and Cr = Credits to the accounts (part of the double entry system that accounting uses).

    Where do you get the OffsetAccount from?
    Because we are working with two accounting systems (QB's and Management system), we have a 6900 Suspense that offsets between the two. So, if we posted normally we would debit the Cash Acct and credit the 2100 Advanced Deposit Acct. The 2100 act is a liability act so a credit adds to it. The Cash Acct is an asset account and a debit adds to it.

    Now with the two accounting systems the Management System and QB's. We debit the Cash Acct and credit the Suspense Acct in QB's. Then we would debit the Suspense Acct and Credit the Advanced Deposits in the Management System.

    If the Account is a debited and its the 2100 Acct then the offsetting account is a credit audits the 6900 Suspense. It is the opposite if the suspense is the debit and then the offsetting account is a credit and is the 2100 Advanced Deposit account.

    In this ledger the only two accounts are the 2100 Advanced Deposit and 6900 Suspenses. Thats is the only choices!... Its a long story!

    Sorry I was traveling today and could not answer till now!

    Thanks

    u3rick

  69. #269
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    In Lodgix the invoice = (Reservation) and an invoice can have changes made to it at anytime by staff at guest request. The Changes that are allowed to an invoice by Lodgix are as follows; guests, property, start date, end date, amt paid and total booking charge. This will need to be consider in the updating process you are working on. Some Reservation Systems cancel the invoice # if any changes are made, but Lodgix does not. I think this makes it necessary to check Lodgix's Advance Deposits Report daily for changes.

    I added the deposited column so the ledger could still be matched to deposits as made by staff(no matter the time period, day, 2 days, etc.).

    u3rick

  70. #270
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Ok, got it!
    It helps that I used to be an accountee like you, but that's 3 lives ago (may be more)
    So I have to dig deep sometimes...

    Overlooked one column:
    Where is the TotalBookingChgs coming from? It's not in the Advance Deposit Report coming from Lodgix.
    Is that the total charge for the whole rental period?

    Still chewing on this AdvanceDepositsLedger. Shouldn't that have the journals you described?
    If so, I would think that importing the Advance Deposit Report record would trigger the generation of these journals and post them to the AdvanceDepositsLedger.
    Hmmmm....
    Where does this Advanced Stays Ledger come in?

  71. #271
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Overlooked one column:
    It is in the Advanced Deposit Report the column is hidden, Sorry!

    I would think that importing the Advance Deposit Report record would trigger the generation of these journals and post them to the Advance Deposits Ledger.
    Yes you are right, but I notice in QB's (as close as I could tell) it looks like a report that they pull off of the Ledger table. But I am not 100% on that so, we can do the way it is easiest to program.

    Where does this Advanced Stays Ledger come in?
    Its one i am thinking on but should be for advance payments on ES rentals. Sometimes renters pay ahead. But I think it can be handled in The Advanced deposits ledger instead. Thats why I add the Type column using SV or ES to show kind of activity.

    Update: What I should have said here, is that I changed the name of Advanced Deposit Ledger to Advanced Stays Ledger. The reason is I added the possibility of posting prepaid extended stay rent to this ledger. So I changed the name!!

    u3rick
    Last edited by u3rick; 11-20-2015 at 02:04 AM.

  72. #272
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tisjallie

    Do we still need tables to move InactiveOwners, InactiveProperties, TransHistory, etc., too? Seems like the Delete_YN and others may handle that . I have no experience to draw from so direct me in this matter?

    Also I have renamed the workbook to Management System and have included a copy here and in Dropbox. If you have time check my formulas inAdvancedStayLedger sheet to see if my corrections are right.

    Also made changes to my version of Vacationville Admin file.

    Thanks

    u3rick
    Attached Files Attached Files

  73. #273
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    check my formulas inAdvancedStayLedger sheet to see if my corrections are right.
    Are the formulas in columns Dr and Cr meant to distribute the amounts in column Paid over the columns Dr and Cr, so amounts equal or larger than 0 would go into column Dr and amount smaller than 0 would go into column Cr?
    If so then
    • the formula in column Dr should be like
      Formula: copy to clipboard
      Please Login or Register  to view this content.
    • and the formula in column Cr should be like
      Formula: copy to clipboard
      Please Login or Register  to view this content.
    Notice the [@Paid]. This looks in the Paid column on the same row. Without the @ it references the entire column.

    The formulas in columns InvBalance and AcctBalance, TotalBookingChgs, TotBkingChgsByUnit and TotAcctBalBkingChgs are OK.
    What's the function of CompletedInv_YN ?

  74. #274
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Do we still need tables to move InactiveOwners, InactiveProperties, TransHistory
    Active is a property of Owners and Properties. So that should be a column in the Owners table or the Properties table resp.
    Therefor no need for the InactiveOwners and InactiveProperties tables (and alike).

    History is built and maintained with the Deleted_YN (or Cancelled_YN?) column. So no need for TransHistory or any other specific history tables.

  75. #275
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    What's the function of CompletedInv_YN ?
    Thought since these postings don't leave that we would mark finished reservation (Invoices) with a Y would help in sorting.

    Thanks

    u3rick

  76. #276
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Are the formulas in columns Dr and Cr meant to distribute the amounts in column Paid over the columns Dr and Cr, so amounts equal or larger than 0 would go into column Dr and amount smaller than 0 would go into column Cr?
    No, they are to make sure the Dr and Cr are always positive number. The change that goes with it is that the dr account #. I change the formula in both too:

    Please Login or Register  to view this content.
    Is that ok?

    u3rick

  77. #277
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Rick,
    here is a demo of a procedure to automatically import the Advance Deposit Report into the AdvancedStaysLedger.
    The procedure has some prerequisites to execute:
    • The folder where the demo resides needs to have the subfolders "Inbound" and "Archive"
    • The folder "Inbound" needs to contain one or more files named like "Advance_Deposits_Report*.xls"

    The demo performs the following actions:
    1. Checks for the existence of the folder "Inbound"
    2. Checks if the folder "Inbound" contains one or more files named like "Advance_Deposits_Report*.xls".
    3. If any such files are found ask whether they should be imported now
    4. Check if the record structure of the import file has a valid record structure
    5. Strip any unnecessary rows from the import file to keep only the data (2 header rows and a totals row)
    6. Convert the remaining data rows in the import file to a table
    7. Copy these data to the AdvancedStaysLedger table extending it for each imported row
    8. Close the import file without saving it
    9. Move the import file from the "Inbound" folder to the "Archive" folder

    Important is that the structure of the Advance Deposit Report is always the same.

    Demo is also in our dropbox.
    Attached Files Attached Files

  78. #278
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    here is a demo of a procedure to automatically import the Advance Deposit Report into the AdvancedStaysLedger.
    Thanks will look at this information later today.

    I have put into dropbox the latest version of the Management System 6.0.2 for you to check formulas in OwnerTransLedger and ServiceList when you have time.

    Also; When should I start transferring ES Reservation 3.0.2 in to ManagementSystem 6.0.0?

    Thanks

    u3rick
    Attached Files Attached Files

  79. #279
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I made the demo work and its very smooth! Here are some questions since you are out there trail blazing! This report only lest us pick two things end date and weather to use Check-in or check-out date as its fulfillment date. (We always use check-out date). So this leads me to think that this auto import program is only looking for differences

    In Lodgix the invoice = Reservation= Advanced Deposit and an invoice can have changes made to it at anytime by staff at a guest request. The Changes that are allowed to an invoice Advanced Deposit by Lodgix are as follows; guests name, property, start date, end date, amt paid and total booking charge. This will need to be consider in the updating process you are working on. Some Reservation Systems cancel the invoice # if any changes are made, but Lodgix does not. I think this makes it necessary to check Lodgix's Advance Deposits Report daily for changes.
    This would included marking the line that has been changed as deleted_YN if necessary!

    I am not sure how this is done, but when it loops through it can first delete all matching lines. Then it can filter the page to matchup the Invoice numbers by Checkout date. Then it needs to check for changes in Guest Name, Unit code , Check-in date, check-out date, Total booking Chg. If all those match then it would know that it can write it as a payment. If any of the others were changed it would trigger a change to a new invoice with the same invoice # and would write the information and mark the existing matching row as deleted_YN as Y. (I think!!)

    Hope you understand any of this not sure I do!:roll eyes:


    Thanks

    u3rick

  80. #280
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Question here:

    1) If I have a unit cleaning chg that goes on an owners acct. Then I need to post it to The Accts Payable Ledger, the Journal and the General Ledger, Can I do this in the same code or do I have 3 separate Sub that are call when the event happens?

    2) Then the Journal needs to write a line for debit and a line for credit how is this best done in the coding (see below)?

    Screen Shot 2015-11-24 at 6.02.46 AM.png

    3) The ledger is the same with additional data and is sorted different (see below)?

    Screen Shot 2015-11-24 at 7.03.40 AM.png

    These examples are from QB's but are the way I think they should be setup in the Management System Accounting.


    Thanks

    u3rick

  81. #281
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Some Reservation Systems cancel the invoice # if any changes are made, but Lodgix does not.
    So an invoice number can occur multiple times in the AdvancedStaysLedger, but only the last one will have "N" in Deleted_YN and - apart from the first record - they're all changes to the previous record. Right?

    In that case indeed the import procedure should check for any previous records with the same invoice number and set Deleted_YN in that recod to "Y".
    Remember that in this system a record is never physically deleted or updated, but versions of it are kept and all previous versions ae marked Deleted.

    I will extend the demo to check for changes and mark previous versions of a record as Deleted.

    This report only lest us pick two things end date and weather to use Check-in or check-out date as its fulfillment date. (We always use check-out date).
    Don't understand what you mean by this. Can you explain?

  82. #282
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    If I have a unit cleaning chg that goes on an owners acct.
    What is a unit cleaning chg?

    Then I need to post it to The Accts Payable Ledger, the Journal and the General Ledger, Can I do this in the same code or do I have 3 separate Sub
    If these always go together then you better put 'm together in one sub. If you also need to execute these individually then split 'm in separate subs.

  83. #283
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    check formulas in OwnerTransLedger and ServiceList
    Why aren't you using row 2 in the OwnerTransLedger table?

    Will look at the formula tomorrow.

  84. #284
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Don't understand what you mean by this. Can you explain?
    The Advanced Deposit report that Lodgix runs has two choices that the operator gets to make, one is the date you look at the report (End Date), the other is when the invoice is looked at as completed. The two choice for looking at the invoice as completed are 1) Check-in date, 2) Check-out date (We always use Check-out date). I said this because all the other information and data we need to keep track of, we have to get from the changes made to the invoices. If the checkout is different from the recorded one then the invoice has been extended or shortened. The deposit amount my not change, but the total charge will be more or less. I think the point was we need to address the changes by recording them to the report and the saying "Y" to Delete_YN for the old one. Just keep in mind that every column can change in the ADR report except the Invoice Number.

    What is a unit cleaning chg
    It is the amount Vacationville charges the property owner to clean the unit before the next renter moves in.

    Why aren't you using row 2 in the OwnerTransLedger table?
    Was going to ask how, but I assume that I write addition code to make another new row and fill with require data in same sub!

    Lol! I was going to say happy Thanksgiving then realized you don't have that holiday!

    Well happy Thanksgiving anyway!!

    u3rick

  85. #285
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Checked the AdvancedStaysLedger table.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    should be
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Notice that the syntax for Deleted_YN is different. That's because of the underscore in the column name.

    Rest of the formulas seem OK. You're getting the hang of it

    But there's something else going in this table.
    Depending on what checks you have set on formulas (see File -> Options -> formulas -> Rules) you may notice the red triangles at the topleft of the cells in some columns.
    These indicate there's an inconsistency in the formula of the column.
    And - for instance - you will see that, when adding a new row, the column UnitOwner contains a formula (with errors) which you probably thought to have removed. Same goes for some other columns.
    This is (what I consider) a bug in Excel. It happens that "under the hood" things like formulas remain present in the table definition and so are copied to new rows.
    Solution is easy: just copy the entire table to the clipboard and immediately paste it back. Done.

    BTW, what's the source of these data?

  86. #286
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    I was going to say happy Thanksgiving then realized you don't have that holiday!
    I'll have a beer anyway! Don't need a holiday for that

  87. #287
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    BTW, what's the source of these data?
    Advanced Deposit Report from Lodgix

  88. #288
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I have loaded a new version of Management system in Dropbox (v6.0.4) and attached here. I have dummied up the Journal and and General Ledger sheets to look as they should in showing the data. I have looked on the internet and found no direction on how to set up the sheets to make them work as setup. So maybe you can look at these sheets and shed some light on this for me?

    I think Ledger entries should be triggered with each entry to the Journal. As I see it, the Journal is trigger by events or entries to the special Ledgers. I am trying to assimilate a list of these events that trigger entries to the Journal. An event in my mind would be a Stay's ending date or an ES Reservation triggering a credit to a owners account for next months rent, as well as to the Guest for Rent due. Is this thinking in line with yours?

    Also made some changes in special ledgers you can look at!

    Every time I think I am making headway I really only find 20 more Questions!! Lool!

    Thanks

    u3rick
    Attached Files Attached Files
    Last edited by u3rick; 11-27-2015 at 11:44 AM.

  89. #289
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    I think Ledger entries should be triggered with each entry to the Journal. As I see it the Journal is trigger by events or entries to the special Ledgers. I am trying to assimilate a list of these events that trigger entries to the Journal. An event in my mind would be a Stay's ending date or ES Reservation triggering a credit to a owners account for next months rent, as well as to the Guest for Rent due. Is this think in line with yours?
    Yep, that's exactly the way I think the core of such apps should work. Together with some ad hoc procedures like reporting, archiving and alike.

  90. #290
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Also made some changes in special ledgers you can look at!
    What sheet is that?
    Last edited by Tsjallie; 11-27-2015 at 07:39 AM.

  91. #291
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    What sheet is that?
    AdvancedStaysLedger =(data from Advanced Deposits Report Lodgix and will also track Prepaid rents from ES Reservation)

    OwnerTransLedger =(payments, charges, checks to Owner accounts)

    These are really Special Journals, but don't want to change the names!

  92. #292
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.


  93. #293
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    No problem. But the functionality wouldn't be in the DatePicker.
    It would (probably) be a userform with a selectionbox and 2 dateboxes (controled by the Datepicker).
    When selecting a period from the selectionbox a procedure would be executed with a select case construct.
    Each case would handle a period and calculate a startdate and an enddate for it.
    The calculated dates would then be fed into the dateboxes and there you are.

  94. #294
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Thats sounds easy!:roll eyes: I will try

  95. #295
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    I've been looking at the Ledger.
    Getting that right is not just a matter of some neat formulas, but is firstly a design issue.
    I will try to get back to you tomorrow with a proposal to get this fixed. Need to (mentally) check the setup I'm thinking of yet.

  96. #296
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    No problem. But the functionality wouldn't be in the DatePicker.
    It would (probably) be a userform with a selectionbox and 2 dateboxes (controled by the Datepicker).
    When selecting a period from the selectionbox a procedure would be executed with a select case construct.
    Each case would handle a period and calculate a startdate and an enddate for it.
    The calculated dates would then be fed into the dateboxes and there you are.
    What the best way to make the addition to the date picker, if I want to use it in many reports. Can you put forms in forms?
    Last edited by u3rick; 11-27-2015 at 06:12 PM.

  97. #297
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    What the best way to make the addition to the date picker, if I want to use it in many reports. Can you put forms in forms?
    You don't need to change the datapicker.
    Just make a workbook (or use an existing one) and create a new userform.
    Add a selectionbox and 2 textboxes to that userform.
    Assign a list of reporting periods to the selectionbox.
    Finally write a procedure which fires when a selection is made (change event of the selectionbox).
    This procedure should calculate a start date and an end date based on the selected reporting period.
    Best to do this in a select case construction.

    You can use the datapicker like in the other workbooks.

  98. #298
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Feeding the Ledger.
    Here's what I'm thinking of how to feed data into the Ledger.
    Either from external sources, the ES Reservation Calendar or manually.
    The GeneralLedger sheet has a diagram showing the process flow, a process description and a sample of newly introduced IN/OUT-table in it.
    The latter possibly could be replaced by the Journal. Not sure yet.
    The whole process is event based.

    Let me know what you think.
    Attached Files Attached Files

  99. #299
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Something that's been worrying me for quite some time now: will the workbook(s) be used (and updated) by multiple users simultaneously?

  100. #300
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Something that's been worrying me for quite some time now: will the workbook(s) be used (and updated) by multiple users simultaneously?
    I think 99% of the time i would say no, but I can't say about that other 1%. I assume thats a big problem?

    Also check my work in frmJournal and mdlTimePeriod please. Not sure if my code will work as months move along! I put version v6.0.6 in drop box and attached.

    Will look at what you sent me in the morning!

    Thanks

    u3rick
    Attached Files Attached Files

  101. #301
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    I like the chart and I agree with it all the points. Looks like the best why to handle!

    Thanks and have a beer or two!

    u3rick

  102. #302
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Also check my work in frmJournal and mdlTimePeriod please.
    Two things did not work correctly; 1) If you pick a date from dtbxFrom or dtbxTo the cboTimePeriods should change to "Custom". 2) If you use the cboTimePeriods it should redo the choice you make. That seemed to work except All Dates would not clear dtbxFrom or dtbxTo.

    Thanks

    u3rick

  103. #303
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    Two things did not work correctly; 1) If you pick a date from dtbxFrom or dtbxTo the cboTimePeriods should change to "Custom". 2) If you use the cboTimePeriods it should redo the choice you make. That seemed to work except All Dates would not clear dtbxFrom or dtbxTo.
    There are a few things you need to change to get it working OK:
    • Move the code setting the selected item in cboTimePeriods back to "Custom" from dtbxFrom_Click() to dtbxFrom_Change(). Same goes for dtbxTo.
    • In dtbxFrom_Change() as well as dtbxTo_Change() check for the FormEventsEnabled variable. Only execute the code if true.
    • When executing the cboTimePriods_Change() procedure start with setting the FormEventsEnabled variable to False. Set it back to True at the end of the procedure.
    • Declare the public FormEventsEnabled variable as boolean in the mdlTimePeriod
    • In the cboTimePeriods_Change() procedure change Case "All dates" into Case "All Dates". It's case sensitive.

    I also see you using a very peculiar way to call functions. Never seen it being used like that and working

  104. #304
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    I also see you using a very peculiar way to call functions. Never seen it being used like that and working
    How do you want it to be written for this project?

    I can't be trusted!!lool!

    u3rick

  105. #305
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    How do you want it to be written for this project?
    Well, it's not about what I want, but normally a function would be called like
    Please Login or Register  to view this content.
    But if your way works fine, why bother?

    Few other things though (just informational):
    • You're adding the name of the module containing the functions (qualifying) while the functions are declared public.
      In that case they are available throughout the workbook and so qualifying is not necessary.
    • A collateral benefit of declaring the functions public, is that they become available in the worksheets. Meaning you can use them in formulas.
      Not sure if that's what you intended when putting them in a separate module and declaring them public.

  106. #306
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Populating forms with new or existing data and saving to a data sheet.

    I think 99% of the time i would say no, but I can't say about that other 1%. I assume thats a big problem?
    It's not a big problem and if it's not necessary for 99% of the time then it's also not urgent.

    Making the workbook multi-user could (and in my opinion should) be done by moving the data to a database like Access. Technically not very exciting, but if it's not urgent I would park that for later.

    There are however some other reasons for separating the data from the functionality:
    • Your workbook is largely a database application. Most of it comes down to selecting, filtering, updating of data records.
      Only exception is the Calendar. The purists among us will say you should develop a database application on a database platform.
    • An other argument would be the ability to easily change the application. If the application is being used while you're adapting it, you will need to make sure the new version has the latest data when making this new version available to the users. Dissociating the data from the functionality (which is changed) would solve that. But this can also be done within Excel without introducing Access.

    BTW, as we are more and more discussing design, I think it's appropriate to start a new thread focussed on that.
    A nice title for that would be: Designing an Excel application for simultaneous use and for optimal maintainability.

  107. #307
    Forum Contributor
    Join Date
    05-08-2015
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2013, 2016, Mac 2016
    Posts
    629

    Re: Populating forms with new or existing data and saving to a data sheet.

    Tsjallie

    Started the new thread as you suggested will move my questions over there as I work through your latest posts.

    u3rick

+ Reply to Thread
Page 2 of 2 FirstFirst 2

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 02-09-2015, 09:45 PM
  2. [SOLVED] Taking data from a data log sheet and populating that data on another
    By jamalfried in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2013, 10:56 AM
  3. Split data from Master Sheet to existing worksheets and overwrite data
    By vmwest in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-21-2013, 05:36 PM
  4. [SOLVED] Data saved to separate sheet overwrites existing data
    By T-2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-19-2012, 01:14 PM
  5. Populating Client Names with VBA into Existing Sheet (same book) XL97
    By thief425 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2011, 04:11 PM
  6. Replies: 1
    Last Post: 08-15-2009, 05:52 AM
  7. Populating data on Forms from spreadsheet data
    By Kristen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2006, 02:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1