Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6321033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:04:43+00:00 2026-05-24T16:04:43+00:00

Sorry i don’t have any code written because i have never written vba in

  • 0

Sorry i don’t have any code written because i have never written vba in access before. what i need to do is have a combobox autofill on my form to save a bit of time i have a database that has all our parts that includes [parts number] [parts description] [std lbs] [std lbs/hr] a few other perameters i’m just curious as to what the code would look like and where i would put it. i have a good feel for oop workflow if you can provide me some sample code or a good resource i’ll more than likely be able to pick up from there.

thanks /// matthew

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:04:43+00:00Added an answer on May 24, 2026 at 4:04 pm

    Use the Part Number textbox’s AfterUpdate Event. Your code should look like this:

    Private Sub txtPartsNumber_AfterUpdate()
        If IsNull(Me.txtPartsNumber) = False Then
            Me.txtPartsDescription = Nz(DLookup("[Parts Description]", "tblParts", "[Parts Number] = '" & Me.txtPartsNumbers & "'"), "")
        End If
    End Sub
    

    Couple things I want to note. I recommend you name your fields without spaces or symbols and preferably without plurals. If I were setting up this table it would look something like this:

    tblpart
    --partno
    --partdesc
    --stdlbs
    --stdlbshr
    

    You could possibly leave off the “tbl” and just name the table ‘part’ since Hungarian notation has lost favor with many of today’s programmers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry, I don't have the exact code with me, but hopefully this works with
Sorry for the basic question - I'm a .NET developer and don't have much
Sorry, this's my first time to ask a question here. So, I don't have
Sorry that I don't have an example. However I'm creating a scrolling box (scrolls
sorry - I should know this but I don't. I have computed the position
http://imageshack.us/photo/my-images/842/probx.png/ Sorry I don't have enough reputation to post an Image.. Above is a
Sorry I don't have a good title... I was reading this thread: Vector Matrix
Sorry for the title but I don't know other way of asking. EDITED FOR
Sorry for the poor title,I'm new to OOP so I don't know what is
Sorry about the wording of the question, I don't really know how to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.