+ Reply to Thread
Results 1 to 5 of 5

Using VBA to get data from Access into a userform

  1. #1
    Registered User
    Join Date
    02-18-2014
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010, Access 2007
    Posts
    2

    Using VBA to get data from Access into a userform

    Hi all,

    First time I've been here! I'm kinda still learning VB at the moment so struggling a little bit with this.

    I'm currently working on something that requires me to use an access database with an excel userform.

    I have a team of around 50 people who will be making outbound phone calls and the data for these calls is stored on an access db. The people calling don't have MS Access so I've created a userform for these guys in Excel, which they have on their computers, and I want them to be able to click the button "Get Next" on the form and up pops the next customers information to call.

    I have a userform with some text boxes where I want the info to appear on click.

    I have customers name, their mobile handset type which the ordered recently and their phone number.

    So I've started off with the following which seems OK:

    Please Login or Register  to view this content.
    At this point I'm unsure what to use next.......someone suggested a DLookup but that didn't quite work......

    I'm also wondering if I'd need something to send to access to basically say that customer 001 has been pulled through already and to move onto the next because there will be 50 people using this (max) at one time.

    Any help to set me in motion is much appreciated.


    Thanks,
    Scott.
    Last edited by SCOTTY9; 02-18-2014 at 09:47 AM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,958

    Re: Using VBA to get data from Access into a userform

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between
    Please Login or Register  to view this content.
    tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Using VBA to get data from Access into a userform

    I suggest adding a field in your table to mark the customer as already contacted or not. Can just make it a yes/no field, and then select only those customers not already contacted. What I am putting as code is only to get the records loaded in your recordset, and assigns some values from table to variables. It would also mark the customer as contacted.
    Hard to be exact as I don't know what database fields you have, what the table name is/are, etc. but basically:

    Please Login or Register  to view this content.
    Last edited by Arkadi; 02-18-2014 at 11:44 AM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,958

    Re: Using VBA to get data from Access into a userform

    Have you considered putting Access RunTime (Free) on all your users computers? Splitting your db into a FE/BE and running everything in Access?

    Scroll down on this link to learn about RunTime if you are not familiar.

    http://www.hitechcoach.com/

  5. #5
    Registered User
    Join Date
    02-18-2014
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010, Access 2007
    Posts
    2

    Re: Using VBA to get data from Access into a userform

    Thanks Arkadi, I'll give this a go. I'll just edit the names for my database.


    Alansidman, in an ideal world our IT dept. would allow us to install these things. Thanks for your help. I'll take a look at that for my own education


    Thanks,
    Scott

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multiple Users input data using Excel Userform to a Common Access Master Database
    By eummagic in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2014, 01:45 AM
  2. multi user, userform data can we store in access db on a realtime with 4 or 5 users
    By sagar.rajula in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2013, 07:12 AM
  3. Multiuser excel userform data can we store in access database on realtime with 4 or 5 user
    By sagar.rajula in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-25-2013, 09:18 AM
  4. Excel 2010 userform to access and edit the data in MS ACCESS DB tables
    By anand_y59 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2012, 07:46 AM
  5. Data type mismatch - excel userform to access table
    By chinaboy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2012, 08:44 AM

Tags for this Thread

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