473,395 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Fill one control based on content of second control/Retrieve records with combobox

21
Hi there I'm trying to do two things using Access 2000 hopefully someone can help me with it.

1. Using Access Forms if i enter a number in a textboxfield (Named "A") that in another textbox field it will automatically load for example a piece of text which says BETA in field (Named "B")

2. Using Access Forms, What VB Code could I use that will load the first colum of a table (The Primary Key for this example) in a drop down menu, when I click on it it will load up the record with other information on it. Instead of using the (Next, Previous and Find) Buttons.

Hopefully this makes sense.
Dec 18 '07 #1
3 1646
missinglinq
3,532 Expert 2GB
1. Using Access Forms if i enter a number in a textboxfield (Named "A") that in another textbox field it will automatically load for example a piece of text which says BETA in field (Named "B")

Expand|Select|Wrap|Line Numbers
  1. Private Sub A_AfterUpdate()
  2. Select Case A
  3.   Case 1
  4.   Me.B = "Alpha"
  5.  
  6.   Case 2
  7.   Me.B = "Beta"
  8.  
  9. End Select
  10.  
  11. End Sub
  12.  
2. Using Access Forms, What VB Code could I use that will load the first colum of a table (The Primary Key for this example) in a drop down menu, when I click on it it will load up the record with other information on it. Instead of using the (Next, Previous and Find) Buttons

Add a combo box to your form. The Combobox Wizard will pop up

Select "Find a record based on the value I selected in my combobox."

From the query/table the form is based on, click on the field you're searching by (your PK field) to move it to the right side.

Hit Next.

Size the column appropriately.

Hit Next.

Name the combobox.

Hit Finish.

Now you can drop the combobox down and scroll down to the item to search by, or you can start to enter the item, and the combobox will "autofill" as you type. Hit <Enter> and the record will be retrieved.

Welome to TheScripts!

Linq ;0)>
Dec 19 '07 #2
Marks
21
Thanks worked like a charm. Just preparing for the next part of my script :)
Dec 22 '07 #3
missinglinq
3,532 Expert 2GB
Glad we could help!

Linq ;0)>
Dec 22 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ari | last post by:
Hi, i creating a form where i need fill a dataset with records that come from two diferents Comboboxes, and the same time call information in the table that is relate with the information that are in...
3
by: ali poursadri | last post by:
Hi, I want to fill my list box from a dataset in c#. I use adapter and fill command and bind it to a listbox, but it is very slow for large data about 500000 records. How can I view this list...
2
by: John Ninan | last post by:
I am creating Dynamic Usercontrol in Asp.net application. In this application I have a combobox(aspx Page). Which contains various items. Based on item selected I am dynamically populating...
5
by: sianan | last post by:
I have an ASP.NET custom control, which contains a DataGrid with checkboxes. I am trying to figure out how to retrieve the selected records, based on the checkbox's checked state. I want to send...
3
by: Alonso | last post by:
Hi, I have two drop downs and the content of the second one must changed everytime the user changes the selection in the first one. Is any easy way of doing this? Thanks in advance. Alonso
7
by: Hans Merkl | last post by:
Hi, Can anybody recommend a combo box control (textfield + dropdown list) for ASP.NET? I have looked at some products and it seems they all have some problems. I haven't yet found a combo box...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
3
by: Developer in California | last post by:
I am working on developing a generic Web framework using Master Pages in ASP.NET 2.0. What I have done is created a PageRenderer class which has a public method which will retrieve the path of the...
3
by: Magnus | last post by:
Im using a set combobox (ComboBox1) to provide a selection of records from a database table. I have a typed dataset (DataSet1) that contains the typed datatable (DataTable1) that the combobox is...
2
by: kurtzky | last post by:
i created a form that should function as follows: i will enter a number in a textbox..then it should query from the database all the records which has that number..these records will have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.