473,395 Members | 2,192 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.

Using one date field for six items in a drop down list

139 100+
Okay...

I've created a drop down list fed by a table. I want my users to select an item in the list, say `Awaiting Repairs`, then fill in a single date text field. When a command button is pressed Access takes this date and fills in one of six disabled text boxes below (ie the one relating to the item in the list).

I can do this for one item in the list, but I can't get Access to recognise the change of item in the list box - say to `Being Repaired` and then use the date in the text field to fill out the appropriate date box underneath.

This make sense? Anyone know how I get Access to associate the inputted date with the item currently shown in the list and complete the relevant locked date field?

Ta
Neil
Nov 30 '07 #1
1 1232
puppydogbuddy
1,923 Expert 1GB
Okay...

I've created a drop down list fed by a table. I want my users to select an item in the list, say `Awaiting Repairs`, then fill in a single date text field. When a command button is pressed Access takes this date and fills in one of six disabled text boxes below (ie the one relating to the item in the list).

I can do this for one item in the list, but I can't get Access to recognise the change of item in the list box - say to `Being Repaired` and then use the date in the text field to fill out the appropriate date box underneath.

This make sense? Anyone know how I get Access to associate the inputted date with the item currently shown in the list and complete the relevant locked date field?

Ta
Neil
The following is untested "air code" that uses the list index. It is just an idea hat you are welcome to try....if you try it, let me know if it works.

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourListbox_AfterUpdate()
  2. Dim x as Index
  3. Set x = Me!YourListBox.ListIndex
  4.  
  5. Select Case x
  6.       Case x = 0
  7.           Me!txtLockedDate1 = Me!txtDate.Value
  8.       Case x = 1
  9.           Me!txtLockedDate2 = Me!txtDate.Value
  10.       Case x = 2
  11.           Me!txtLockedDate3 = Me!txtDate.Value
  12.       Case x = 3
  13.           Me!txtLockedDate4 = Me!txtDate.Value
  14.       Case x = 4
  15.           Me!txtLockedDate5 = Me!txtDate.Value
  16.       Case x = 5
  17.           Me!txtLockedDate6 = Me!txtDate.Value
  18. End Select
  19. Set x = Nothing
  20. End Sub
Dec 1 '07 #2

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

Similar topics

6
by: Piotr Pietrowski | last post by:
Hello everybody, I have a *big* problem. I thought its not that big problem for you professionals... Anyway, I have a begin date which has 3 dropdown boxes (day/Month/Year). The same for the...
10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
13
by: Hussein Patwa | last post by:
Hi there. I'm new to this group. I'm also partially sighted so navigating the web is sometimes quite difficult. I'm looking for a javascript date picker, you know the ones that travel sites...
1
by: Dmitri Shvetsov | last post by:
Hi All, Is it possible at all, and if yes, then how? Or it's very/extremely hard to do that? Maybe somebody knows...) I'm writing a Web App using VS2003/C#/MSSQL. I'm currently having about...
5
by: mc | last post by:
I've got three controls on a page a Drop Down List, a List Box and a Button I've added 3 items to the Drop Down List I have added some code in the Button onClick Event Handler, as below...
2
by: k.roberts | last post by:
I'm not sure if this is possible or even practical to do, but I have a database which logs customer enquiries and has a field for the status of the enquiry i.e. Received, Approved, Job start, Job...
6
by: Aussie Rules | last post by:
Hi, I have a datepicker that show a calender. The user picks a date and the time component is always 00:00. I then have a drop down that provides a list of times, (10:00, 11:00 etc), and I...
1
by: AndiSmith | last post by:
Hi guys, I wondered if anyone could help me with this problem, or even shed some light on the direction I need to take to resolve it? I'm using .NET 2.0 (C# flavor) to build a large user-based...
1
by: bytenut | last post by:
I would like to display two field values in a combo after selecting from the list items... i.e. my drop-down shows two fields from a lookup, but when I select the item, only the first field value is...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.