473,830 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

139 New Member
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 1252
puppydogbuddy
1,923 Recognized Expert Top Contributor
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
2234
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 end date. So if somebody selects the begin date 13.12.2004 and the end date 19.12.2004
10
19366
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 able to fill that one out just fine. The second form is multipart/form-data. Unfortunately, I haven't been able to fill that out in a way that makes the server happy. I set up a copy of this form at my web site so that I could see exactly what a...
13
3871
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 use for selecting the departure and arrival dates. I've had a look at some sites, but mostly found calendars. I want to make mys tie accessible, so I really want the three scroll boxes for the day, month and year.
1
1698
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 100 different questions, some questions are having relations to another questions and should be published only if the parent has an answer, the most part of the questions should have answers,
5
2621
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 ListBox1.Items.Addd(DropDownList1.SelecteItem); ListBox1.ClearSelection();
2
1842
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 Finish. I need to be able to date stamp so that when a record is received, the status date is set at Date() - no problem. However, the user will continually update the enquiry status field and when they do, I need to write to a date-stamp table...
6
5658
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 want to combine this with the date value, so that I can store it in a single field in the database. How can I combine these two values into one ?
1
2475
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 website. I've created an AJAX based user control, which is dynamically placed on a page (once, or multiple times) if the user has the correct permissions to receive it. It contains two drop down lists - employee value and partner value; and a...
1
2357
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 shown in the combo text area (at the top)... (bound field is invisible) e.g. Currently seeing (standard behavior) drop-down | 1 drop-down | 2 drop-down | 3
0
9793
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10777
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10493
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7747
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.