Forms :: ListBox DblClick To Update Open Form

Feb 5, 2014

I have 2 forms: frmExcEntry and frmItemSearch. frmExcEntry is a data entry form where the associate enters PO#, Item#, Qty, etc. frmItemSearch is a popup form that is used to narrow the search of the Item# from frmExcEntry. Right now, when the associate types the Item# (either PartNo or FactNo)in the txtItemNo control on frmExcEntry, frmItemSearch opens (frmExcEntry remains open) with all potential item #'s associated with the text entered in [txtItemNo]...(there could be multiple FactNo in our inventory system but PartNo is unique and the bound field for the control). frmItemSearch uses an unbound textbox (txtSearch) that populates with the text from frmExcEntry on txtSearch_GotFocus and queries a listbox with the list of possible PartNo to select. I want the associate to be able to double-click the accurate PartNo from the list box which will then update the value initially typed in txtItemNo and copy the PartNo over txtItemNo in the currently open frmExcEntry.

View Replies


ADVERTISEMENT

Forms :: Open Form From DblClick

Feb 8, 2015

I have a main form. It's only contents is an unbound combobox, and it's used to filter down (via a query) the details in it's sub form (I'm using it to load different account information, rather then type it in all the time).Anyway, I also have another form (Dashboard, or mainmenu) which summarises activity within Each account and is displayed via a datasheet.

What I'm trying to do is double click the accountname (on the main menu)which will then open up the necessary form and load the value from the datsheet accountname, in to the newly opened forms cbo, where I can apply the form to requery on load.I'm going to have to DIM the value, and docmd.openform etc...

View 13 Replies View Related

Modules & VBA :: Dblclick Event Not Firing Immediately From Listbox

Jul 25, 2014

I have an issue with the dblclick event not firing immediately from my listbox. It does eventually fire if i mash the mouse button for long enough but obviously that is not an acceptable solution.The listbox also has an afterupdate event which is what fires when i double click.

I have also tried calling the code from an onclick command button which works fine but if i try and call that from the dblclick event it does not.

I have used the dblclick event in other projects with afterupdate and it has worked without problem.

Code:
Private Sub lstFileList_AfterUpdate()
strPDF = Me.lstFileList.Column(0)
Me.PDFViewer.LoadFile (strPDF)
Dim fso As New FileSystemObject
strFileName = fso.GetFileName(strPDF)

[Code] ....

View 7 Replies View Related

Forms :: Update ListBox On Record Change In Form

Apr 30, 2014

I have a form with a listbox in it. I want the listbox to update as the record changes.Let me get a little more in-depth...The form will be used to identify merchandise that exists in the company to fulfill current POs.

What I want is for the listbox (which displays Store Locations) to update when the PO# updates on the form (so as the record changes).Currently, the listbox only pulls all the store locations no matter if you hit next record to get a new PO.The two main fields I am working with are PO# (text box) and Store Locations (the listbox).How can I get the listbox to update as the record changes on the form?

View 1 Replies View Related

Forms :: Onload Event - Open A Form And Update Caption Of A Label

Apr 15, 2013

I have some code on a button that opens a form and changes the caption of a label:

Code:
DoCmd.OpenForm "frmRepair", , , , , , "CancelNo"
Forms![frmRepair].Form.[lblmain].Caption = "Missing Parts"

This code works well and frmRepair opens with the updated label caption. The original value was "Return/repair Information"

A few other things need to change on frmRepair depending on this caption as well as the values of some other fields, so I use the following code in the onload event (although I later tried the onopen even)

Code:
'Disable labels button if there is no RMA and the item is a repair
MsgBox Me.lblmain.Caption
If Me.lblmain.Caption = "Return/Repair Information" Then
Me.txtRMA.SetFocus
MsgBox Me.txtRMA.Text

[Code] ....

However, I cannot get this to work as the "if" statement always returns "Return/Repair information" and not the modified caption. The message box confirms that this is the case.

I suspect that this has to do with the point in time that the frmRepair loads or opens and when my code enters the modified values.

View 13 Replies View Related

Open Form From Listbox

Aug 15, 2005

I have a list box on a form with 10 items to
choose from. When a item is chosen I want
a form to open (OnOpen or OnLoad Event ??)
with a recordsource depending on one of the
10 items chosen in the list box.
The recordsource is an sql statement which
will change/depend on the item selected
The 10 items refer to 10 different tables.

Thanks for your help

View 3 Replies View Related

Open Form Based On Value From A Listbox

May 19, 2006

Hello !

I am a newbie in access and would appreciate if someone could help me with a delicate problem i have

I have listbox in formA named "Liste1", this listbox contains a departmentvalue (unique) in the first column shown in the listbox.

What i want to do is open a new form (frmStructureDetails) by doubleclicking on the listbox, and i want the new form to load with filter on that department. Btw the departmentvalue is textformatted.

The result i get is a dialoguebox opening and not seeming to recognize which value to use, if i fill inn the value i clicked on the form loads with the correct data.


What am i doing wrong:

Private Sub Liste1_DblClick(Cancel As Integer)
On Error GoTo Err_SearchList_DblClick
Dim db As DAO.Database
Dim rst As DAO.Recordset

DoCmd.OpenForm "frm_StructureDetails", , , "[Department] = " & Me.Liste1


Exit_SearchList_DblClick:
Exit Sub

Err_SearchList_DblClick:
MsgBox Err.Description
Resume Exit_SearchList_DblClick

End Sub

View 1 Replies View Related

Open New Form Based On Listbox Selection

Oct 25, 2005

I have a form which has a listbox listing all the letters a student has had sent home. Basically i want to be able to click on a letter in the list box and for a popup form to open with the record details. However it just brings up a blank record.

The list box has a unique field called standardletterID.

the code behind the button to filter was just used through the wizard to open the popup form is:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmstandardletterspopup"

stLinkCriteria = "[StandardLetterID]=" & Me![List0]
DoCmd.OpenForm stDocName, , , stLinkCriteria

but it doesnt seem to be working :(

I thought this would be easy but no matter how much i destroy my database trying to do it its not playing ball!

View 1 Replies View Related

Open Form/record With Listbox Selection

Sep 26, 2006

Hi,

Need help on a list box issue. Solution is probably real simple, just can't see it with my bleary eyes.

I have a form (INSTLKP) with only a list box (List6) based on a table ((tblPersData) with fields PersdataID; SSN; Last; First; MI) on it. When I open the form up, the listbox does display all records associated withthe table. I would like to doubleclick on a desired SSN in the list box and have that record open up in a form (Perssub1) in edit mode.

And that is where the rub is... I have the following code in the On doubleclick event of List6


Private Sub List6_DblClick(Cancel As Integer)

DoCmd.OpenForm "Perssub1", , , "[PersDataID]= " & Me.List6, , acWindowNormal

End Sub


All it does it just open a blank Perssub1 form. Any ideas on what I'm missing?

:confused: Hawg1

View 6 Replies View Related

Open Form To Selected Record From Listbox

Dec 13, 2006

Yet another question.

I have a listbox on a form that show all Files for a particular volunteer. I have an "Edit File" button below the listbox to be able to edit that particular file. Is there a way about opening that form to that specific record without using a query?

Thanks
ScrmingWhisprs

View 12 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

Update Form While Still Open And No Record Cycle

Apr 13, 2007

Hi,

I am entering data into 2 tables using the same form, the PK of the first table cannot be entered in the second table unless it exists on the first table. The problem is that the first table does not update the data entered before the second table looks for the PK in the first table.

I wonder if it's possible to make the form update its source table while the form is still opened and no records have been cycled?

Any suggestions will be very much appreciated.
B:)

View 1 Replies View Related

Select All Listbox AND Update Listbox

Jun 17, 2005

Hello,

I've got this multiple select listbox which writes data into a textbox:

Private Sub List2_AfterUpdate()

Dim Cursisten As String
Dim ctl As Control
Dim Itm As Variant

Set ctl = Me.List2

For Each Itm In ctl.ItemsSelected
If Len(Cursisten) = 0 Then
Cursisten = ctl.ItemData(Itm)
Else
Cursisten = Cursisten & "," & ctl.ItemData(Itm)
End If
Next Itm
Me.txtCursisten = Cursisten

End Sub

And I've got a SELECT ALL button to select all records in the listbox:

Private Sub cmdSelectAll_Click()
On Error GoTo Err_cmdSelectAll_Click

Dim i As Integer

If cmdSelectAll.Caption = "Alles Selecteren" Then
For i = 0 To Me.List2.ListCount
Me.List2.Selected(i) = True
Next i
cmdSelectAll.Caption = "Alles De-Selecteren"
Else
For i = 0 To Me.List2.ListCount
Me.List2.Selected(i) = False
Next i
cmdSelectAll.Caption = "Alles Selecteren"

End If

Exit_cmdSelectAll_Click:
Exit Sub

Err_cmdSelectAll_Click:
MsgBox Err.Description
Resume Exit_cmdSelectAll_Click

End Sub

The only thing is that when I use the SELECT ALL button, the function List2_Afterupdate doesn't work anymore. There must be a simple solution but I just can't figure it out. Can anyone please help me?

Tnx a lot!

View 13 Replies View Related

Modules & VBA :: Update Open Form After Linking To A New Backend Database

Mar 18, 2014

I have an Access DB with a form that allows the user to select a new backend database. I can connect to the backend and then .refreshlinks but nothing on the form is updated. I have tried requiring the form but that doesn't do anything. I've tried loads of other things, refresh, recalc etc., but nothing updates the open form.

The only way I have managed to get it to work is to close the form and reopen it, then it shows the data from the newly linked backend database.

While it works, it doesn't look good but also there seems to be some problem with it because eventually it reports an error saying "cannot open any more databases" and when clicking OK comes back with "An error occurred while sending data to the OLE server (the application used to create the object" and a whole bunch of other messages.

I think it might have something to do with the fact that the form has a number of MS graphs open on it, but I'm not sure. Also, I can't track down a particular line of VBA code which causes this error.

how to update a form after changing the backend database.

View 14 Replies View Related

Forms :: When Open A Form / Want To Open Another From At Same

Jan 14, 2015

when i open a form i want to open another frm at the same time. i have a main form with some buttons in it. when i click on a button and a form opens then i am not able to click on a button to open other forms from the main form.

View 2 Replies View Related

List View DblClick Event

Sep 1, 2006

Hi
I have placed a ListView on the form. I have written a DblClick event for the ListView. The application is a multi-user one. The issue is that the DblClick event was working for few days and now it does not work for any of them but it is working only in my system.

Is it related to reference ? I developed the tool on my system and placed in a shared folder from which everybody uses. Do I need to give reference in all the system ? Please help. I am stuck with this problem.

View 1 Replies View Related

Show Username When Textbox Dblclick

Sep 24, 2014

I am looking for a way to display a windows login name when the user double clicks on a text box. This is for a digital signature on a form that I don't want people having access to just type in some elses name.

View 3 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

Forms :: Listbox To Continuous Form?

Oct 24, 2013

I have a listbox which contains a list of schools. I would like the user to be able to select 1 or all the records from that list box. From that list of selected records, my goal is to allow the user to use each school selected and use that as a record source for a continous form so I can allow the user to input a integer next to it, like school size.

Example:
Listbox (Schools)
ID, Name
1, Thomas School
2, Jefferson School
3, Washington School
4, Madison School
5, Franklink School

User select Thomas, Washington and Madison

In a Continuous Form it would list,
Thomas School, Text Box (Allow User to input School Size)
Washington School, Text Box (Allow User to input School Size)
Madison School, Text Box (Allow User to input School Size)

I then would save those records into a table.

View 6 Replies View Related

Using DblClick To Move Data Between List Boxes

Oct 8, 2006

Hello,

I am looking for a way to use the dblClick function to move the current row of a list box to another. The idea is that users can look through data and pick certain rows to be printed in a report. I am not sure how to go about doing this and am not sure if it is the best way. The second listbox is so the user can review their selections before printing a report.

Thanks,

Kristopher

View 2 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

Forms :: Unbound Form With Bound Listbox

Jun 2, 2015

My code is not working.

1. The code below should equal the Current Month
2. It does not close the form if no data.

PHP Code:
If DLookup("[CurMonth]", "tblEmpEvaluation") = Format(DateSerial(Year(Date), Month(Date), Day(Date)), "mmmm ")
  DoCmd.OpenForm "frmEvalNotice"
End If 

PHP Code:
If DLookup("[CurMonth]", "tblEmpEvaluation") <> Format(DateSerial(Year(Date), Month(Date), Day(Date)), "mmmm ") Then 'No Data. NotWorking?
    DoCmd.Close acForm, "frmEvalNotice"
End If 

View 7 Replies View Related

Forms :: Populate Listbox On Dialog Form

Sep 19, 2013

In my tables I have a field called first serial. This is the first element of a serial number range associated with each record. Very rarely I have to ask the user to specify a certain serial number in that range. (The serial numbers can be generated easily from the first serial) This happens during the run of a macro, so I have to use a Fom opened with WindowMode:=acDialog. The problem is that I have to populate a listbox with the generated serial numbers on that form. But I can't interact with a dialog form, since it stopos the running of the macro. I have tried to open it hidden, and change the modal property to true once the listbox have been populated, but this dosen't stop the macro to wait for user input.Is it possibble to pass the first serial value to the form, and populate the listbox in one of the Form's opening events?

View 3 Replies View Related

Forms :: How To Go To Specific Record In Listbox From Another Form

Dec 11, 2014

I have three forms: Form1 that contains subform1 and Form2 which is totally separate. Form1 contains a listbox that I use as a search form. When a record in the listbox is clicked, it populates Subform1 with more details.

If I am in Form2, I would like to be able to click a record which opens the listbox in Form1 to the same record (this will automatically update subform1 with the details).

View 7 Replies View Related

Forms :: Listbox On Form - Checking For Duplicates

Aug 14, 2013

I have a Listbox on a fprm which has a button attached to it, the button allows you select one of the items in the listbox and append it to a table. the problem is that it currently allows you to add the item as many times as you like. How can I check for duplicates?

Code:
Private Sub CmdAdd_Click()
'Add new record to tblShootingTasks
strSQL = "INSERT INTO tblShootingTasks ( ShootID, ContactName, Task ) " _
& "SELECT [Forms]![frmTasks]![ShootDateiD] AS ShootID, [Forms]![frmTasks]![Combo15] AS ContactName, [Forms]![frmTasks]![Frame17] AS Task;"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
End Sub

View 14 Replies View Related







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