VB.net working with Access Databases - database

I have a combo box that I have to select a name from (I already have the access data names loaded in the combo box). After the user selects a name the program should display in three separate text boxes the date of hire the id number and the salary. In addition to that if the employee works full time there is a radio button that should be checked.
I have no idea how to do this. I'm using MS Access.

Related

MSAccess populate multiple fields with a single pulldown

Challenge: I've created a simple repository in MSACCESS (#1) that displays one or more owners of a corporate server.
The sub-form "asset-owners" is linked to the corp-assets main-form (#2). I've added a pulldown whereby the user can select a name (#3) from the address_book (#4) table and prepopulate the owners sub-form.
Objective: I would like to auto populate the associated "Occupation", "Favorite Food", and "Favorite Movie" fields when the user selects a name from the pulldown (#5).
I am not exactly sure how I should configure the occupation food and movie fields to auto-populate with such data AFTER the user has selected the name. I was thinking an inline query for each field, but I suspect it may be simpler than that.
Note: occupation, food, and movie data comes from the address_book (#4).
Many thanks!
I hope you don't want to repeat data in another table. If you just want to display the related data, options:
create multi-column combobox then expression in textbox references combobox column by index - index begins with 0 =[comboboxname].Column(1)
include lookup table in form RecordSource and bind textboxes to fields - set them Locked Yes and TabStop No
DLookup() expression in textbox.

How to create a form with option to add additional combo boxes?

I am working on a fairly basic database for my work of various companies in the region and I'm not really experienced in Microsoft Access. I'm trying to make a form where the user can add additional fields such as a combo box to the form.
Example: They enter the company name and then select the province and then the city, but that company also operates in other cities in a different province.
How would I create something like this? Or am I going all wrong about this?
Currently I have a dual multi-select combo box, in which the user can select multiple provinces and cities.
Current Form
Companies Table
Cities Table
Provinces Table
Relationships

combo box fails to populate both fields in the associated form

I have a single combo box which selects data from a table called Roster. It chooses all Scout_ID's and Full_names and displays them so the user can choose a record to enter data against.
I am not sure how much detail you would like, but the basic problem is that the combo box populates the key field (Scout_ID) but fails to populate the Full_name field on the same form.
The interesting thing is that different form uses the same technique, however, it populates both ID and Name perfectly. I have been working with Microsoft support for a week and they can't explain it either.
Can anyone help?

Set combo box value using VBA

I am attempting to set the value of a combo box from a "Splash Screen" type form in Access that will take the user's computer name and load two combo boxes on another form with the Employee ID and Manager ID, which are both bound columns of the combo boxes, which are unbound themselves. I can get the IDs in the combo box, but i want it to still display column 2 (Names) of both combo boxes. Right now it just displays the IDs. Anyone got any ideas how i can get it to react like i actually picked it in the combo box?
So, comboboxes can sometimes be tricky, but once you get it down you should be good to go.
So, when looking at a Combobox's properties,
The Format tab :
ColumnCount: 2 <-- You want the ID and the Name
ColumnWidths: 0";1" <--- You're hiding the ID field, which is the first column
The data tab:
This is where you're going to tell Access what data you're supplying for your combobox.
Usually it's a query or table data source. If it's a query you should be selecting the ID and Name fields, and use that query in the RowSource property in the Data tab.
Row Source: Select ID, Name FROM YourTable
Row Source Type: Table/Query
When you use the Wizard to create the combobox, it's fairly straightforward. When Access asks you to format your data source, you completely shrink the ID column, so it hides it (but it's still there).
The steps would be:
I want the combobox to look up the values in a table or query
Select the Table or Query
Select the Fields (ID and Name seem appropriate for your scenario)
Any sorting you may want
The next screen is where we want to hide our ID column, so shrink it entirely
The next screen is where we tell Access that we want the ID to be in scope (selected) when we select a combobox item
Name it & be proud

make field a dropdown in access 2007

I'm creating a HR database in access 2007
I have a main table of employee info and several tables that relate to that table ( education for example) that list the acceptable elements that can populate that cell in that row
When i create a form it was created as just a plain text field which is constrained but I wanted to create a dropdown that had just the data that they are allowed to enter to avoid confusion.
You should be able to right-click the text box and select Change To -> Combo Box.
If you are not familiar with creating controls, it is best to use the wizards. Select a combobox from the toolbox and add it to your form, you will be guided through creating the type of combo that you want.
You should also examine the relationships you have created.

Resources