Results 1 to 13 of 13
  1. #1
    Jboshear is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Location
    Los Angeles
    Posts
    8

    Porting my broken MS Access 2003 App to MS Access 2016

    Note: I am not a professional programmer. I just learn what I need in order to get a specific job done. I am that Jack of All Trades you may have heard of.



    I have worked for a custom cabinetry company since early 2001.

    One of the first things I did when I hired in was create an MS Access program to generate the paperwork needed run a job through Assembly into Finishing and finally Installation.

    I used the Users login feature Access had at that time. At some point along the way the program crashed and we lost the login function. However, we can still use the program I just can't upgrade because if I make changes and try to save them it fails and tells me I am not logged in.

    Now I really need to enhance the program so we bought MS Access 2016. My plan was to recreate the program from scratch. I originally designed it with a Front End and a Back End. The Back End is fine I just need to recreate the Front End.

    Let me cut to the chase. I have a form with about 15 pulldowns and each pulldown is associated with a subForm. For example one pulldown is for Crown Molding. We have about 8 different styles of crown molding so when you select a style from the pulldown a picture of the profile shows up in a field below the pulldown.

    That works on the old program but not the new version.

    When I look at the event properties of the pulldown in the old program I have:

    After Update: =CPR("Crown")

    On Change: =WFEvt(0)

    On Exit: =WFEvt(1)

    When I put those parameters into the new program I get these errors:

    The Expression After Update you entered as the Event Property setting produced the following error: User-defined type not defined.

    The Expression may not result in the name of a macro, the name of a user-defined function, or [event procedure].

    There may have been an error evaluating the function, event or macro.

    My problem I have no idea where to begin trouble-shooting this.

    Thanks in advance for any help.

    Jerry

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,818
    When you upgrade, you often 'spoil' the references. Open vb editor and check them. One or more might be marked as missing, and some older ones are deprecated. That would explain error #1 and maybe even the rest. However, one thing at a time.

    A quick method of arriving at a solution is often to copy/compact and zip your db and post here. See How to Attach Files in the forum header.
    Explanation of what to do to replicate the errors is always a good thing.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    other thing to take into account is that as access has matured it has become less tolerant of 'poor' programming practices

    Ensure all your modules have Option Explicit at the top (just below Option Compare Database) and then debug>compile and fix any errors.

    might also explain your first error

    I presume CPR and WFEvt are functions - they should be in a standard module so I would look there after you have checked references and successfully compiled

  4. #4
    Jboshear is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Location
    Los Angeles
    Posts
    8
    Thank you Micron. That helped point me in the right direction. The code is missing in some modules.

  5. #5
    Jboshear is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Location
    Los Angeles
    Posts
    8
    Thank you Ajax. CPR and WFEvt are functions. Somehow they were missing in the new version.

    I don't have everything working yet but I am making progress.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,818
    Did you convert the old db (Save As) or start fresh and use the Get Data feature to import your objects? Seems like it is the latter and you overlooked some objects (e.g. modules). References are not 'importable' IIRC. Might be better to just start over and make sure you grab everything, or do a Save As if the 2 versions are not too far apart for that.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Jboshear is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Location
    Los Angeles
    Posts
    8
    Thanks Micron,

    While I am making progress I am feel like I'm running in circles a little so I think I will try the SaveAs idea. The two versions are not that far apart, the PC's are sitting right next to each other! ()

    ;;
    J

  8. #8
    Jboshear is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Location
    Los Angeles
    Posts
    8
    Oh, nevermind. When I try to do a Save As on the old version it tells me it can't save because it is encoded. I can't decode it because I can't login.

  9. #9
    CarlettoFed is online now Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    258
    If you can, try to attach the file, or if it is too large to post it on a data sharing site such as Dropbox or other, to see if you can recover it.

  10. #10
    Jboshear is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Location
    Los Angeles
    Posts
    8
    Hi CarlettoFed,

    Thank you for replying. I'm not sure if I am allowed to to that. The owners of the company is out of town. I will talk to them about when they get back.

    Thanks again.

    ;;
    J

  11. #11
    Jboshear is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Location
    Los Angeles
    Posts
    8
    What I am doing in the mean time is printing ALL the code for both versions of the program and I am comparing them.

    The PDF for the old code is 43 pages and the new program is only 30 pages so once I rectify that discrepancy I will have either fixed the problem OR I will be able to come back and ask more specific questions.

    Thanks again to all y'all.

    ;;
    J

  12. #12
    Jboshear is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Location
    Los Angeles
    Posts
    8
    Some problems were resolved by adding in the missing code. Thanks to all who contributed.
    However, now I have a new minor issue:

    As I said, one of the forms in this program has 15 different pulldowns and each pulldown is associated with a sub form so that when a selection is made in the pulldown the sub form shows a photo of the selection.

    Now what happens is that when the user makes a selection in the pulldown the sub form does not update. If it previously had a photo that photo I’d still displayed.

    However, if I use the record selector of the main form to move to a different record and then come back to the first record the photo new is displayed correctly. So that means the selection worked but the field did not refresh.

    I have tried adding me.refresh to the after update field but I honestly have no idea what I am doing here, I may have put that command in the wrong place.

    Also I am still getting the error message:
    ”The expression OnLoad you entered as the event property setting produced error: User-defined typo not defined.” when I first launch the app.

    I look forward to your replies.

  13. #13
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,818
    If you used me.refresh on the main form code but want the subform to refresh, that is the wrong place. You'd need something like
    (substitute your form name and the subform control name which may or may not be the same name as your subform)

    [Forms]![Main form name]![subform control name].[Form].Refresh

    Could also try Me.[subform control name].[Form].Refresh

    As for the other issue, if a compact/repair didn't help consider posting a zipped copy of your compacted db for analysis.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 08-08-2018, 11:23 AM
  2. Running Access 2003 with Office 2016
    By NickMDal in forum Access
    Replies: 4
    Last Post: 12-28-2017, 08:56 PM
  3. Replies: 2
    Last Post: 09-26-2017, 09:18 AM
  4. Replies: 3
    Last Post: 04-25-2017, 08:33 AM
  5. Replies: 1
    Last Post: 10-10-2014, 10:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums