Access Database Problem Solved

Page 2 of 2 FirstFirst 12

  1. Posts : 235
    Win10 Ver. 1809 Build 17763.`
       18 Jan 2018 #11

    Is it returning a string at all? What does

    Dim x as Integer
    x = len(Me![PersonTypeID])

    give you?
      My ComputerSystem Spec

  2.    18 Jan 2018 #12

    Access database problem

    For a combo box set to allow multiple entries it generates a type mismatch. For a combo box set to allow only 1 entry it works fine. Text length is 6 for setting Member. This is the general situation. Everything woks correctly for single entry and generates the mismatch for multiple entry.

    all the best
      My ComputerSystem Spec

  3.    18 Jan 2018 #13

    Hi robertd,

    First, I have to say Thank You for introducing me to Multi-value fields and Multi-value combo boxes.
    They look like a super idea, but I am finding the implementation a little confusing.
    My impression is that using a multi-value field is just a way of avoiding creating another little table in your database - one that would be easy to set up, understand and use. Multi-valued fields seem to be unique to Access and I would avoid using them.

    However, if you must...

    To get at the data held in the field, you need to use:
    which will give you a comma separated list of the values stored in the field.

    You can also tell whether each option is selected by using:
    where n is the index for the list. This will return True or False, but I have no idea how you know which index number relates to which value in the list - if you work this out, please let me know.

    Note that Me!comboboxname.Value does not seem to return anything useful. It is not Null, but neither does it appear to be a string or a number.
      My ComputerSystem Spec

  4.    18 Jan 2018 #14

    Access database problem

    Thanks for this. I have a big meeting tomorrow about the database but I will look at this ASAP
      My ComputerSystem Spec

  5. Wiley Coyote's Avatar
    Posts : 1,052
    Windows 10 Home x64 Version 1809 (OS Build 17763.253)
       18 Jan 2018 #15

    It's been SEVERAL years since I did any Access db programming and design. I do remember that the Wizard was often a helpful tool for things like List and Combo Boxes. No doubt you've been there, but thought I'd throw it out there in case you hadn't.

    Good luck with your meeting.
      My ComputerSystem Spec

  6.    18 Jan 2018 #16

    Access database problem

    Thanks nbcaldon for the pointer to use the Text rather than Value. This has fixed things. But as I can only access PersonTypeID.Text when that field has control I had to put the code for checking the constancy of it into the On Exit event. That leaves consistency code concerning another field in the routine I posted. As regards the Select function the first item is flagged by n = 0, the next by n = 1 etc. As far as I see things here the order is that which you have in the table that feeds the combo box. However, I have not yet succeeded if getting Selected(n) to return sense. So far I always got False even when I manually selected a value with the cursor. I do not need this as yet but if I get there I will get back to you.

    best wishes
      My ComputerSystem Spec

  7.    19 Jan 2018 #17

    This is what I meant for a test:

    For n = 0 To 1
    MsgBox n & ": " & Me!Combo2.Selected(n)
    Next n

    Actually returns the numeric 0 or -1, but can be tested for True and False.

    Looking a but more into MVFs, I cannot find any documentation to say what the Value property should return. I did find someone saying it returned a recordset, but I could not assign it successfully to a recordset object, so I suspect this might not be correct.

    As regards where the data is stored, I have seen mention of hidden tables, but there are no simple hidden tables. It appears that the data is stored in a non-trivial way in the system tables, partly (but not entirely) in 'MSysComplexColumns'.

    My recommendation would be that MVFs should only be used for simple applications where the wizards give you what you need and you do not need to get at the data in code. Otherwise, I think it is more manageable to stick to explicit many-to-many join tables and use subforms instead of multi-value combo boxes. I don't expect everyone to agree with this.
      My ComputerSystem Spec

  8.    19 Jan 2018 #18

    Access dadabase problem

    OK, I see, thanks. I agree with you about the multi-entry combo box. But the charity specified that they wanted the facility in several fields to multiple entry. As I am not involved in its running or direction and only got involved database wise on a voluntary basis, what they said goes.

      My ComputerSystem Spec

Page 2 of 2 FirstFirst 12

Related Threads
Solved Win 10 Update Database Corruption in Windows Updates and Activation
When I run the Windows Update Troubleshooter it says the Windows Update Database is corrupted. How can I fix this? Advice would be appreciated.
Hi I have error when to connect visual studio and database , I tried two windows 10 and 7 but does not solve the problem, its after I search for Google and YouTube could not find , two time reinstall Windows 10, 7, same problem 114189
Greetings. I dont know how to stop Lotus Notes aplication error. When i open .nsf file get the message : You are not authorized to the database for user's local mail file Ple​ase advice me something for Lotus Notes fix. Regards
I recently upgraded to W10 and now when I try to change a form in Access 2010 DB It errors and has to close. The error is : Faulting module path: C:\PROGRA~2\COMMON~1\MICROS~1\VBA\VBA7\VBE7.DLL. If I undo the change then all is fine. There was a...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 15:57.
Find Us