?
Solved

Access Form to control Data Entry

Posted on 2009-04-30
2
Medium Priority
?
285 Views
Last Modified: 2013-11-28
I am trying to develop a data entry only form for Microsoft Access 2003. I want the user to use a combo-box to select the Vendor, then it should display details about the vendor and display a Product combo-box filtered to the Vendor selected. Selecting the Product should display Product information. Then the user inputs details about the Product, ie. Serial No., Exp Date, etc.

This is a portion of my Database Structure (I am not sure if the Primary Key or Foreign Key relationship is right):

tbl_Vendors
VendorID pk (1:many to tbl_Products.SupplierID)
CompanyName
Address

tbl_Product
ProductID pk (1:many to tbl_ImplantDetail.ProductID)
ProductName
SProductNo
SupplierID fk (many:1 to tbl_Vendors.VendorID)
StorageType

tbl_ImplantDetail
ControlID pk (1:1 for expansion and additional data collection)
ProductID fk (many:1 to tblProducts.ProductID)
LotNo
SerialNo
ExpDate
Condition
Temperature
LocationCD fk (many:1 to tbl_Location.LocCD)

tbl_Location
LocCD pk (1:many to tbl_ImplantDetail.LocationCD)
LocDescription
LocTemp

I understand that Visual Studio 2005 might be better to use, but I have only just started to practice with it.

Thanks for any help you can give.

0
Comment
Question by:rockant
  • 2
2 Comments
 
LVL 11

Accepted Solution

by:
srikanthreddyn143 earned 2000 total points
ID: 24274391
For Each Combobox have the event Selectedvaluechanged and populate based other combobox based on the selectedvalue.

Ex:
VendorCombobox_SelectedValuechanged()
'Load Products based on selectedvalue
{ Dim ds As DataSet
Dim sSQL As String = "SELECT * FROM Products WHERE SUPPLIERID = " & VendorCombo.SelectedValue.ToString()
 'Hope you know abt SQLCONNECTION AND SQLCOMMAND
Dim da As SqlDataAdapter
da.Fill(ds)

ProductsCombo.DAtaSource = ds
'Specify DisplayMember and ValueMember

 
}

ProductsCombobox_selectedvaluechanged()
'Load the Product Info
{
Dim ds As DataSet
Dim sSQL As String = "SELECT * FROM ProductINfo WHERE PRODUCTID = " & ProductCombo.SelectedValue.ToString()
'Hope you know abt SQLCONNECTION AND SQLCOMMAND
Dim da As SqlDataAdapter
da.Fill(ds)

}
0
 
LVL 11

Expert Comment

by:srikanthreddyn143
ID: 24274398
Sorry you have to use OleDBAdapter instead of SQLAdap. and also OleDBConn,OleDBCOMMAND
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question