Automatically Inserting A Date When A Item Out Of A List Box Is Selected

Aug 28, 2003

I have a MS Access database, which contains three main tables. With these I have a completed table, which holds either Yes/No within it.

One of the tables, I have linked to the Completed table as a list box, which when a job has been completed, either yes or no can be selected.

But, what I want to happen, is, when the Yes is selected, I want Access to insert the date the 'Yes' was selected, so that the employee cannot lie about the date the job was completed.

Hope I have explained this in a good enough fashion.

I don't have a clue how to go about it, could anyone help.

View Replies


ADVERTISEMENT

Change Font Color Of Selected List Box Item

Jun 3, 2013

My list box will be used to populate a form, is it possible that once the item is dble-clicked, it reverts to a different color to let the user know it has already been selected once or can the row be locked once it has been selected?

View 2 Replies View Related

Modules & VBA :: ListBox Identify Selected Item Without Looping In Whole List

May 9, 2014

Show me the selected item in a Listbox without looping in the whole list, because my Listbox is multiselect and I want only the item that selected recently.

View 8 Replies View Related

Modules & VBA :: Enable Command Button When Item Selected From List Box

Oct 14, 2014

I have a simple listbox (single column, no multi-selection).I want to enable a command button when the user selects an item in the listbox / disable it if no items are selected.I'm using the AfterUpdate event of the listbox, as follows :

Code:

Private Sub lstOptions_AfterUpdate()
Select Case Me.lstOptions.ItemsSelected.Count
Case 0
Me.comConfirm.Enabled = False
Case Else
Me.comConfirm.Enabled = True
End Select
End Sub

But when I select an item from the listbox, and debug the code, the Count is always zero? Even though I can see the item selected??

View 2 Replies View Related

Automatically Inserting A Date

Jul 10, 2006

the people that i am creating a database for are wantingto have a "date" field but they dont want to manually input it. they would like the date to automatically update to todays date when they start entering the details.

can this be done?

many thanks

michelle

View 4 Replies View Related

Automatically Inserting Current Time

Nov 11, 2007

I am trying to get the current time to display in the same record as an identity number.
I am using a barcode scanner to identify the ID number. Using a program called BC Wedge it will place the ID number into a field in a table of the database. I also want it to record the current time the ID number was scanned.
I tried setting the default value of the 2nd field to Now(), however this does record the current time, but in a new record. This basically gives me a list of ID numbers from the barcode scanner and a list of recorded times, however all the times are one record out.

Is there anyway to get the recorded time to be placed in the same record as the ID number?

As far as I am aware the BC Wedge software needs to have the table in table view, although I may be wrong about this.

Hope somebody can help me with this.

View 4 Replies View Related

How Do I Show A Selected Item?

Dec 29, 2006

I have a main form with several continuous subforms on it. These subforms are based on a selection of fields of a complete and editable form, so these subforms are overview forms so to speak. Whenever a field of a certain record is clicked, the other subforms show the linked data for that record, whenever a field of a certain record is double clicked, the corresponding form opens so data can be edited.

I would like to show which record is selected (record selectors are not enabled) in the way you select text in any application in windows. So when record A (holding fields A1, A2, A3 and A4) is selected in any way, the text should be lit up as if struck with a text-marker pen.

How do I go about that?

It would really be nice, since there is a cascading effect of records going on in the main form, which can get a bit confusing if you have to or want to glimpse at which record is selected. So for ease of use, this feature would really be nice.

View 4 Replies View Related

Created List Box With One Column - Display All Characters Of List Item

Jan 2, 2014

I have created listbox with one column (contains one column only), now i would like to display all the characters of list item (want scroll bar to listbox).

How do i display all text of list item, I have already fixed Column Widths to max length (22";0.1"). However when scrolling to right, it is going to next blank column of list box, which is created only to change Column Widths property.

View 12 Replies View Related

Combo Not Accepting Selected Dropdown Item

Jun 5, 2005

:confused:

I have a frmServiceOrder form that has a "datasheet type" sfrmSOItem subform with a combo box that allows a user to select service order items...

Problem:
When I select a service order item in the dropdown, it doesnt place the item in the record...I have to select it a 2nd time in order to make it appear in the record. However, if I select the item by typing (i.e., via autofill) and hit the enter key, the item will populate in the record the 1st time.

I suspect it has something to do with my query joins. I hav played with various combinations and cant find a solution...

Any clues?

Thank you.

View 1 Replies View Related

Save Columns Of Listbox Selected Item

Jul 23, 2007

Hi all,

Does anyone know how to get the columns of a listbox selected item and store it to a string? There is no multi-selection so it should be easier. I tried
s$ = Me.list1.selected but it keeps giving me an error

Thanks alot

View 3 Replies View Related

Modules & VBA :: Listview Control Selected Item?

Jan 30, 2015

In a form, I have a listview control bound to a TreeView control.

By default LV considers "selected" the first item on the list even if it is not highlighted.

In Form is a command button that performs an operation on the item selected, but to prevent accidental activation requires two tests:

1) the list is not empty

Code:

If LV.ListItems.Count = 0 Then Exit Sub

2) an item is actually highlighted.

How can I make the second test?

View 3 Replies View Related

Modules & VBA :: Determine If Item From Listbox Is Selected

Jun 12, 2014

I am having trouble with a If statement. I am trying to save a record into a table when an item is Selected (highlighted blue) in a list box. Keep in mind that my listbox is set to multiple selections. I have the following code but sometimes it works and sometimes it doest.

The reason why I am trying to get this to work is because when a item is selected I will add it to the table and when an item is deselected I will delete it from a table. See my code and pictures I have attached :

Private Sub list_audits_Click()
Dim strsql As String
Dim list As String
Dim id As String
id = Me.User_ID.Value

[Code] ....

View 2 Replies View Related

Forms :: Remove Item After Being Selected From Combobox?

Mar 30, 2015

How can I remove an item after being selected from a combobox ?

View 2 Replies View Related

Queries :: Get Information From Selected Item Of ListBox

Nov 22, 2013

From a search form example I got from this forum I made the following:

A listBox which shows results as you type, using a query.

This listBox has 1 column, I need it that way.

What I need is to show the information from the selected item of the listBox on a textBox, getting this info from the results of the query.

I found 2 answers which I don't like:

1- =DLookUp("[Column]","[Query]") as source of textBox

This shows only information from the first row. So if you select the second result from the listBox, it still shows the first row.

2- =SearchResults.column(int) as source of textbox

It does not work, because listBox has only 1 column.

View 4 Replies View Related

First Item Selected Not Showing Up In Text String

Aug 28, 2015

I have an unbound listbox "Needs", and in the onclick event have the following code which works great if I have more than one item selected, but if I only have one item selected, it does not put it in the text box "ServiceText".

Code:
Private Sub Needs_BeforeUpdate(Cancel As Integer)
On Error GoTo errHandler
Dim ctl As Control
Dim strStart As String, strEnd As String
Dim aryList As String
Dim varSelected As Variant

[code]....

View 4 Replies View Related

How To Transfer Multiple Select Item In List Box To Another List Box

Jun 2, 2012

How To Transfer MultipleSelect Item In Listbox to another Listbox ?

View 7 Replies View Related

Forms :: Fill Value In Textbox When Item From Combobox Is Selected

May 19, 2013

I have a table, Registration, with 8 fields:

inschrijvingsid,name,gemeente,gsm,telefoon,email,a ankomst,gerecht,personen

I have another table, Login with 3 fields : Naamid,name,,status

Then I have a combox that is connected with fldname from the table Login.

In that form I have 8 textboxes:

name,
gemeente,
gsm,
telefoon,
email,
aankomst,
gerecht,
personen

And status.

Now what I can't. I want when I select a record from tblLogin Like for example Daan that I see in the textboxes his info from the tableRegistration.

Also when I change the textbox Status it and click "Verander status" it changes in the database.

View 3 Replies View Related

Forms :: Combo Box With Msgbox If Selected Item Is Not In Record

Oct 30, 2014

I want a Messagebox to be appear if the selected item or if the input item in the combobox was not in the record.

I used this condition in combobox

="[asstnumbr] = " & "'" & [Screen].[ActiveControl] & "'"

but when I try this run code function in macro via IFF will become error

IIf([asstnumbr]<>"'" & [Screen].[ActiveControl] & "'",MsgBox("NO RECORD FOUND IN YOUR SEARCH"))

View 1 Replies View Related

Drop Down Selection - Once Item Is Selected - Populate Field To Right

Apr 14, 2014

I am trying to do the following. I understand how to create relationships.However, when I create a field with a drop down selection (in this example Phone Number and Email) once that list item is selected I would like the column to the right to populate that information.So when Phone # is selected, the field to the right will populate a number for this individual.

View 2 Replies View Related

Forms :: How To Move Up And Down Selected Item In Access Form Listbox

Feb 10, 2014

I've designed access form with one listbox and added 'up' and 'down' buttons to move up and down the selected item in the listbox. i.e from its selected position to one item up when 'up' button clicked and same as one item down when down button is clicked. Any VBA code will do this functionality?

View 7 Replies View Related

Tables :: Delete Item Entered In One Table From Another Automatically

Dec 24, 2013

Im trying to make a basic customer database and pos system. The part iam having trouble with is, I have two tables as follows:

Inventory: orders(invoices):
productId ProductId
amount (in stock) amount(sold)
pricePerUnit CashTendered

I want the amount(in stock) sold in each order to be deducted from the total in the amount(sold) automatically.

View 1 Replies View Related

Forms :: Access 2003 - Scroll To Selected Item On Multiselect Listbox

Sep 2, 2013

I've got a form with a multiselect listbox (extended) that holds a very long list of items (~90,000):

1 | Apple
2 | Orange
3 | Banana
...............
35313| Corn cob
...............

The user can select multiple items (non-sequential) on the listbox, say items 1 and 35313. I'd like the listbox to scroll (meaning display) to the currrently selected item, so that the user can see it while being processed.

I've seen stuff about property ListIndex, which does exactly that, but it's only useful when you have just ONE item selected (in a multiselect listbox apparently it deselects the rest of the items, so no point in using it, I guess, unless there's more to it!!).

So the key here is how to do the scrolling/display.

The code to loop through the listbox and process each selected item is attached:

Code:
Dim vItem As Variant
Dim Content as String
For Each vItem In Me.lst.ItemsSelected
'scroll to selected item ???
'processing of the selected item
Content = Me.lst.Column(1, vItem) 'copy the content to do sth with it
Me.lst.Selected(vItem) = False 'unselect the current item
Next vItem 'go to next selected item

how to scroll to the currently selected item? Mind that I need to go through the list of selected items to process them for further use (i.e, I need them selected).

View 4 Replies View Related

COMBO BOX : Specifying Item Not In List

Jun 22, 2006

Hi everyone,

I have a form with a field named TREATMENT with the following options :-

1 Cryotherapy
2 Radiotherapy
3 Chemotherapy
4 None
5 Other (specify)

If the 5th option (Other) is selected, the user is required to specify what 'Other' represents.

I have created a combo box with the first 4 options and in instances of 'Other' the user can enter specific treatment that is not in the list (1 to 4).

What I would like to do is whenever the user enters a value that is not on the list (1 to 4), I would like to insert the word OTHER in front of the value entered. In other words all values not on the list will be prefixed by 'OTHER'.
E.G. if 'Surgery' is entered, I would like the value 'OTHER : Surgery' to be stored in the Treatment field of the table.

This will help in the generation of statistics from the table.

Any suggestions??

Many thanks in advance.


Will

View 3 Replies View Related

Selecting An Item In List Box

Oct 30, 2005

Hi
I have placed a Listbox in MS Access form. I use VBA. I have saved the item selected in the List box in a database. While retrieving the item from database, I want the listbox selected i.e the item should show as highlighted in the list box. Is this possible ?

View 3 Replies View Related

List Box Move Item Up / Down

Sep 10, 2012

I have a listbox named list0. How to move item up/down in listbox by using command button.

View 9 Replies View Related

Changing The Colour Of An Item In A List Box

Sep 13, 2006

HI all, the objective is to grey out an item within a listbox, where the id number is the same in another sub form. The sub form is called contacts and the list is called list15. the unique id that is linking the two is SWD.

HELP...:confused:

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved