Subsequent Action After Listbox Updates

Mar 28, 2012

I have a listbox on a form which displays data based on the value of a textbox. I requery the listbox every second or so using the timer event on the form. What I want to accomplish is that whenever the listbox changes, i.e. a new row is added to the list, a subsequent action (in my case, a beep) occurs.

I tried the afterupdate property of the listbox but that doesnt seem to work. The listbox is unbound.

View Replies


ADVERTISEMENT

Forms :: Running A Subsequent SQL Query

Oct 2, 2014

I am writing VBA code behind a form that used SQL SELECTS on various tables - the results of one query determine the next. I`m using the ADODB object library:

strSQL = "SELECT * FROM Table1 WHERE Field1 LIKE " & value1
objRecordSet.Open (strSQL)

Then later:

objRecordSet.Close
strSQL = "SELECT * FROM Table2 WHERE Field1 LIKE " & value2
objRecordSet.Open (strSQL)

But, when I access objRecordSet.Fields.Item(x).Value it shows the results of the first SQL statement, not the new one. I'm trying to find a way to reset the object - is there a way to do this?

View 1 Replies View Related

How To Prevent Subsequent System Date From Being Update

Jun 11, 2006

I've design a form as such when i FIRST add a NEW
RECORD, I want the system date to be capture into the
form. I have a table calls Register. And this table
has a field "DATE" which takes the value of the system
date(=now). However, when i open the same record the
next time, the orginal value(at the time when the
record is created) of the field "DATE" will be
replaced by the new system date. However, i do not
want this to be happen because i want the field "DATE"
to take the value of the system date when i first
created the record. My question is how to prevent
subsequent system date from being updated in the
record whenever i open the same record? Thank you.

View 1 Replies View Related

General :: Indenting Second And Subsequent Lines In Text Box

May 12, 2013

In a report, I have a text box with variable length text. Can Grow is set to Yes. If the box grows, I would like all the subsequent lines to be indented. Is that possible?

View 2 Replies View Related

General :: Using A Combo Box To Set Default Value For Subsequent Records?

Nov 29, 2012

I am trying to create a user friendly form to enter a list of competitors entering an event.

I would like the user to pick from a list of events and that event to be used for subsequent records until the user changes it.

I have used a combo box to pick from a list of events but that needs to re-selected for every new record. I then added a second unbound combo box to give the main combo box its default value. It works but is not very user friendly.

View 4 Replies View Related

Queries :: Identify Subsequent Records Where Original Record Meets A Criteria

Aug 8, 2014

I have a table [PickData] in a WMS (Warehouse Management System) database, that records details of each item picked. The key fields are;

[Movement] - a unique ID for a collection of items to be picked.
[ToAssignRef] - the order ID
[Product] - the product!
[Picked] - the date/time the item was scanned
[Pick Actioned] - the date/time the [ToAssignRef] was completed
[Reason] - A code to indicate why an item could not be picked - AKA F3'd

An operative would be allocated a movement, connected to the [ToAssign Ref], containing a number of products to pick. If an item can not be picked for some reason the operative presses F3 and selects a reason (no stock, damaged etc). These F3'd items (other stock allowing) will later be picked on a different [Movement]. I need a query to identify the subsequent [Movements] and the associated fields following the occurance of an F3'd [ToAssignRef] & [Product].

I have a query, but it runs very slowly (perhaps due to the DB size currently 780K records). Is this the right approach, is there a better (faster) way to do this?

Code:
SELECT PickData.ToAssignRef, PickData.Product, PickData.Picked
FROM PickData
GROUP BY PickData.ToAssignRef, PickData.Product, PickData.Picked
HAVING (((DCount("[Movement]","[PickData]","([ToAssignRef]='" & [ToAssignRef] & "') AND ([Product]='" & [Product] & "')"))<>0));

View 2 Replies View Related

Forms :: Based On User Selection In A Form / Create New Records For Subsequent Form

Feb 3, 2014

The user will be creating a new project that contains a bunch of releases. The releases have standard names which are stored in a table tbl_ReleaseNames It should be noted that the list of names is not static.

The user selects which of the releases pertains to their project and then based on their selections, new records would be created in tbl_RFP_Release and then a subsequent form would open where it would display each of these newly created releases where they could enter additional information. I thought of creating an unbound checkbox associated with each of the standard names, and then checking to see if the checkbox was checked and then creating the new records followed by opening up the new form.

View 6 Replies View Related

Copying Data Within Same Form From A Listbox Containing A Query To A Blank Listbox?

Apr 21, 2006

Hi, I'm new here, so I hope I'm posting this in the correct place. I've searched the forum to see if there are any existing threads that might help me, but I've not found anything that does...
(I think this thread ( http://www.access-programmers.co.uk/forums/showthread.php?t=93444&highlight=Copying+data )may be trying to achieve something similar to me, but I'm a beginner and don't really understand it)

I shall stop waffling! I'm not entirely sure that what I'm trying to achieve is possible, I expect it probably is!

Right, I have a form (frmGroupRegister, which contains exactly the same fields as the table it comes from, tblGroupRegister), which consists of three things:

-GroupDate - The date a group took place on. It is my primary key, as no more than one group occurs on a specific date.

-ParentList (A listbox which contains a query showing the ID number, forename and surname of everyone in a table, tblParentDetails)

-ParentsAttending (A blank listbox)

I would like to place buttons in between the ParentList and ParentsAttending, which would allow users to conduct a 'register' of attendance by copying individual/multiple details from ParentList into ParentsAttending (much like you get when choosing which fields to include in a form when using a wizard for example). I would also like them to be able to remove people from ParentsAttending by using a button in case of accidentally adding the wrong person into the ParentsAttending box.

I'm aware that another, probably simpler way of achieving this would be to use a tick-box system, but I feel that visually, the first method would both look better and demonstrate who is present more clearly.

Any help would be much appreciated, but my Access skills are quite basic and things will probably need to be spelled out for me.
I'm using Access 2000 and Windows XP.
Thanks for your help,
Alice :)

View 1 Replies View Related

Forms :: Dynamic Row Source For Listbox From Multi-select Listbox

Jun 10, 2015

I am using the selections made of the form to generate a query for the user.

I have a CITIES listbox that is populated with values from a stored query.

I would like to make it multi-select and populate a LOCATIONS list box and a NAMES list box based upon the CITIES that are selected.

I have the locations currently populated from a stored query that reads the City selection from the Form. It looks like this

Code:

SELECT DISTINCT (t_location.LOCATION) AS Expr1
FROM t_location INNER JOIN t_asset_master ON t_location.LOCATION_PHY_ID = t_asset_master.LOCATION
WHERE (((t_location.CITY)=[Forms]![MasterQueryGenerator]![CityList]));

I also want multi-select so that is you can un-select all and get the results for all cities.

Here is my half thought approach.

Code:

Private Sub CityList_AfterUpdate()
'Dim LocQryStr As String
'Dim r As Integer
'Dim ctl9 As Control
'LocQryStr = "SELECT DISTINCT (t_location.LOCATION) " & _

[Code] ...

I intended to have the variable LocQryStr as the row source but I abandoned the idea of having multi-select when I saw that .Selected(I) never returned true. Its like the values aren't read in this subroutine.

View 5 Replies View Related

Forms :: Listbox To Show Types Based On Section In Other Listbox

Sep 9, 2013

I have a list box called "product list box" based on a query called "searchqry", i also have another listbox called "type list box" , how do i get the type list box to only show "types" based on the section in products list box?

View 1 Replies View Related

Help Me With Updates!!!

Jan 17, 2005

Sorry for my English, but i try to description my problem.

I have one form and i want all fields to have the privelage for update
without only the field of s/n ( Key of table ) ???

Any ideas!!! ( I am noob in access and VB )
Help me plz.

Thanks

View 2 Replies View Related

Updates

Jan 4, 2006

* I have a form that has a list box at the bottom of the form and all the fields (text boxes) displayed above.
* As I select a record in the List Box it shows that record in the text boxes above and allows the user to edit that specific record.
* I went one step futher and created drop down boxes out of the TextBoxes, which now reference a lookup table.
* Although the users have a drop down box they can still enter a new entry.

My problem is that I want the lookup table to be updated with any new entrys that do not exist in the lookup table. I had this working at one point but cannot remember how or what I did.

Any thoughts?

Thanks in advance



View 3 Replies View Related

Forms :: Passing Listbox Rowsource To Another Form Listbox

Dec 14, 2014

Using a popup form

1. On my main form, I have a listbox, I would like to edit the values of the listbox.

To do this, I have a popup form with 2 listboxes, one to have the values of the listbox on the main form, and the other listbox with option values for the 1st

1) how to i pass the rowsource sql of the listbox on the main form to the listbox on the popup form

2) how on closing the popup form, do i update the rowsource sql listbox on the main form from the changed value of the popup form listbox rowsource sql

View 3 Replies View Related

Forms :: Make Listbox Visible After Selection Of Another Listbox

Oct 23, 2013

Okay then, after much trouble and confusion, I finally realized I need to use an Extended listbox in order to allow for multiple items to be selected from a list on my form (rather than the evil multiple selection combobox!).

However, now I am trying to figure out how to make one listbox (IndustryClassification) only be visible if the item "Industry" is selected in another listbox (TypeOfBusiness). Coding I can use for this in the AfterUpdate event of the listbox?

View 7 Replies View Related

Database Updates

Mar 27, 2006

Back at you guys with hopefully one more question (btw the command button code worked perfectly thanks)

Another thing my database has to be setup for is updates, Roughly 30 people will be using this database and to have them re-copy and paste the new database releases is out of the questions.

Does anyone have experience setting up code that automatically checks the version of the database created and if it differs downloads/installs the new version and the restarts the database so the associate will then be working in the current version?

I am looking to be pointed in the right direction to get this figured out, thanks.

View 3 Replies View Related

Automatic Updates

Oct 23, 2006

Hi there,I know very little about Access but been asked to find out if this is possible:On a database we have a date field for when subscription is due, is there any way that if a DirectDebit method of payment has been chosen, when the date of renewal is, access will automatically update the year to the next one?Thank you very muchCathy

View 1 Replies View Related

Updates To DB Not Saving

Jul 2, 2007

Hi

Have a bit of an odd problem with the DB im using at work. I have 1 DB on a shared drive that is accessed by 4 of us from our desktop PC's (password protected via 1 password that we all use - no separate logins).

The problem comes that we make changes to the data, exit via an exit button that uses a save all macro (that all works fine), however when we go back into to DB there are some times that the changes made have been lost and the data has reverted back to the previous version. There doesn't seem to be any specific pattern to this, it happens at random times and to random people.

Does anyone know what may be causing this, or anyway that i can prevent it happening?

much appreciated.

View 1 Replies View Related

Storing Updates?

Mar 31, 2005

Hi all

I have a database that stores customer records and their associated insurance details. I need to be able to track any changes made to that record within a set time period ie if details are changed fine it is reported next time report is run. But if details are changed more than once in between reports then first detail change is lost.

I would like to work out a way that changes can be written to a ??seperate version of the table?? and stored in there to be reported seperately and not just the final change as is the snapshot nature of a report? Is this possible? Could I possible make another version of the main table appended onto it? I feel I 'know' what I need to do but not how to even begin it! Any help would be appreciated.

DDiver

View 1 Replies View Related

Combo Box Updates

Jun 29, 2005

I have a time database which has a form to enter time. When entering time, The user must also select an item in a combo box that gives what category the user worked in. There are about 40 or so different categories. I want to know if it is possible to update the cobo box to the user's most recent selections. For example: if the user selects Management, which is at the bottom of the list, I would like to see Management at the top of the next list for the next time entry so that the user does not have to scroll down to the bottom again. Anyone have any ideas???

Thanks

View 5 Replies View Related

Combo Box Updates

Jul 15, 2005

Hi, please help!

I have a work order entry form with a "Client" combo box. The Limit to List property is set to YES. If a client is not on the list, I get a prompt to create new client account in a different form. This all works fine.

But after I create a new client and get back to teh work order form, the client does not appear in the combo box unless I close the form and re-open it first. This is very annoying.

Any suggestions? Thank you.

View 4 Replies View Related

Tracking Updates

Sep 22, 2006

I have read all of the audit trail stuff and searched on my subject but I think my solution could be simpler,

All I want to do is copy the values of the current record on my form into a history table with all the same fields.

Example Form:
[ID], [Machine], [Task], [Task Due], [Task Complete]
I want to put a button on the form that reads complete task and when the user pushes the button it copies all of the details for that specific record they are looking at into my History Table that contains all of the same fields.

This will give me basic history on when each task was completed for a machine and I can access for reporting

View 1 Replies View Related

Slow Updates

Sep 13, 2005

I have a project that produces a roll report. To do this, I have two tables:

T1 (roughly 20,000 records)
ID (Primary Key), PrevAmt, CurrAmt, Action

T2 (roughly 40,000 records)
ID, Amt (linked Excel spreadsheet)

I then run 4 queries in sequence

Q1: Update T1 set PrevAmt=CurrAmt, CurrAmt=0;
Q2: INSERT INTO T1 (ID, PrevAmt, CurrAmt) SELECT ID, 0, 0 FROM T2; /* keys that already exists will fail to insert)*/
Q3: Update T1 INNER JOIN T2 ON T1.ID = T2.ID SET T1.CurrAmt=T1.CurrAmt + T2.Amt;
Q4: Update T1 SET Action = iif(PrevAmt=0 and CurrAmt<>0,"NEW",iif(PrevAmt<>0 and CurrAmt=0,"DROPPED",iif(PrevAmt<>CurrAmt,"CHANGED","UNCHANGED")));

T1 and the queries is in an Access file on a network drive. T2 is a link to an Excel sheet on a network drive.

When I run the queries from a PC on the local LAN, it takes about 2 minutes to update. I consider that acceptible. But I now have to run it from a PC attached to the network via a VPN over a somewhat slow DSL line. The queries take over 20 minutes to run. I want to cut that time down. But the Access file and the Excel file need to stay put as other users use them for other purposes. (Though they know not to access them till after they see my roll report in their in-box.)

What can I do to decrease the update time on this?

Thanks,
David

View 2 Replies View Related

Table Updates

Apr 7, 2006

I'm new at access and have added some expressions to a couple of my forms but the table is not being updated with the results. help!

View 5 Replies View Related

After Update Event = No Updates

Mar 6, 2006

Hi there all i need to set a field on my form not to accept any updates to what ever was typed in the field before it was saved the first time kinda like After update event = no updates :confused:

Any idea on how this can be achived please.

Thanks so very much in advanced.

TIDMAN.....

View 3 Replies View Related

Table For Storing Updates

Nov 21, 2004

How do I create a table relationship where a secondary reltated table stores past dates, status code and customer ID. For example: I want to keep track of the past dates that an order was revised and why it was revised. So, if I have a customer who was due for installation on 10/21/04 and status is PEND for pending. THen on 10/18/94 I change the date of PEND to 10/25/04. I want to keep track of the times it changed and the reason why. HOw can I make the program automatically create a record in the revision table storing the past code, reason and date using customer ID as key and teh revision table would allow multiple records for each customer ID. DId I make sense?

View 2 Replies View Related

Easy Updates On Tables

Feb 21, 2007

I am trying to come up with a way to update tables every week from two databases. I have one database for a satellite office and one for corporate. Each office has BOTH databases so as to keep up with their own data (we are not on a network). Each office will have to export their Project Table data to the other and then upload (update) the corresponding database. So:

ABC Division exports their project data from their Project Table once a week and sends to DEF Division and vice versa. Then ABC takes the exported Data from DEF and updates their database for DEF and vice versa.

Field names and additional field names will not happen; however, the data in those fields may be updated OR there may be new records added. So basically, I guess I need to delete the old and put in the new every week but make it VERY easy for the end users (who know nothing about Access). The tables that would be updated are related to other tables.

Does anyone have any suggestions where to get started? I've tried an Append query and that only adds records, not looks for changes in those records.

View 8 Replies View Related







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