Updating Subform From Listbox

Oct 10, 2004

I have a listbox that navigates my form to a specific record based on ClientID

I also have a subform. This form has a field Called clientID which I want to pull all records with the current ClientID.

I can't get my subform to query only the records with the current ClientID in the ClientID field. How can I do this?

View Replies


ADVERTISEMENT

Listbox Not Updating

Jan 25, 2006

Greetings to one and all
I have a minor problem with a list box not updating that is driving me up the wall.
Here is what I have
I have a Form that has multiple pages (Tab control) and in one of the pages I have a list box that has row source of :

SELECT DISTINCT temp_wbs.Wbs_Element_No FROM temp_wbs LEFT JOIN my_wbsids ON temp_wbs.Wbs_Element_No=my_wbsids.Wbs_Element_No WHERE (((my_wbsids.Wbs_Element_No) Is Null)) ORDER BY temp_wbs.Wbs_Element_No;

The temp_wbs table is created after a user runs a process in a previous page, but when the user selects the page that has this list box – it is not updated with the current values from the temp_wbs table – it still contains old data.

However – when the user clicks a button on this page to delete their list (data from my_wbsids table) – the list box refreshes with the correct values from temp_wbs

What am I missing?
Any help in this matter is greatly appreciated
Thank you,
Kenny Louden
:confused:

View 4 Replies View Related

Updating A Listbox

Nov 27, 2006

Hi,
I've a listbox. Once i doubleclick on a data on this listbox an editing form will open.
I modify my data, save, close. But the data on the listbox are the same as before..
how can i update this data?? Something like once i saved & closed the editing form the listbox will update....don't know..
i've tried stuff like requery,refresh, ... but didn't work.. (was my mistake maybe)..:D
thx in advance

View 5 Replies View Related

Listbox Not Updating Table

Mar 16, 2006

Hi All,
Apologies if I'm posting in the wrong forum. Not quite sure whether this should be in tables or forms.

My question is, I have two tables, one containing general data and one containing data used to populate a listbox. I want the selected value in the listbox to be used to populate the corresponding field in the other table but my users want to be able to tab through the entry form. If they tab over the list box without actually selecting a value, the table is not updated with the listbox value. How can I make this work?

Hope that's clear and someone can help.

Many Thanks

Rich.

View 1 Replies View Related

Updating A Listbox According To The Record You're Viewing

Apr 30, 2005

Hi

I have a database containing 3 tables (for now):
Customers
Orders
Catagories

Now i also have a form with customer information.
In that form is a listbox with a query statement, so that should display wich orders are placed by that customer.

SELECT Orders.[Order-ID], Orders.Description, Orders.Date, Orders.Category FROM Orders WHERE Customer=[Customer-ID];


Now this works for the first costumer record being displayed.
However when i view the next costumer, the listbox still displays the order information from the first customer.

How can i get the listbox to update itself when a diffirent record is viewed?

Thanks in advance

View 4 Replies View Related

Modules & VBA :: Updating Multiple Items In A Listbox

Jan 9, 2014

In my form I have the listFunctions list box set to Multi Select "Extended" in the following code contains a line to execute a query based on the selected items in a listbox. but for some reason instead of only changing the selected items it is changing all items in the listbox. I stepped through the code and it is looping the correct number of times based on the amount selected but is still changing all.

eg.if I select 3 items from the list, it loops through the execute 3 times.but the total 6 items will change.

Code:

Private Sub cmdEdit_Click()
Dim varItm As Variant
Dim sSQL As String
Dim ssSQL As String

[code]...

View 1 Replies View Related

Forms :: List Box Updating Using Another Listbox Value As Header?

Sep 14, 2013

I need to construct a very complex student/coach/time/day Database.

Every student can attend a lesson twice a week, on a particular day and time with a particular coach.

Every coach has his/her own time table (Days available, times available on those days).

So I want this effect on a form:

Day: Monday
Coach: Jack
Time: 10:00

So Coach is dependent on Day, Time is dependent on BOTH Coach and Day.

I got the first one working but I am stuck on the second.

I created a Table for every day of the week (Mon through Friday) and have each coach's name as the "header" of a column, in that column I have the times they are available:

Code:

Jack - Roy
08:00 - 09:00
08:20 - 09:20
08:40 - 09:40

In my form, in the event procedure of the second list box I have the following:

Code:
Select Case [Swimming_Day_1]
Case "Tuesday"
[Time_1].RowSource = "SELECT [Coach_1].Value " & _
"FROM [Tuesday Times] "
End Select

But now when I select for example "Jack" in the "Coach_1" List box, the "Time_1" list box lists 3 entries of "Jack", not "08:00, 08:20, 08:40" respectively.

How can I accomplish the above without having to create a separate Day/Times Table For each and every coach (There are 8 coaches and 5 days, and I want things as easy as possible to update coaches should there come extra or some leave maybe).

View 5 Replies View Related

Forms :: Automatically Updating Fields In A Subform From Another Subform

Feb 11, 2014

I am having trouble figuring out the method to automatically update some fields in SubForm from 2 other SubForms.I have attached 2 pics, the first GradeEntry1 shows what the tblTopic_Class_Grade form looks like after I manually enter everything into it. GradeEntry2 is what the form looks like when I fill out the Form starting at the top.

I'd like the tblTopics_Class_Grade form auto-populate the TrainingClassID (it currently does this), TopicClassID, StudentID, TrainingTopicID based off the entry from the above forms.My end goal is that I need to have a grade for each student on each training topic for each class. Like:

Class1-Student1-Topic1-GradeX
Class1-Student1-Topic2-GradeX
Class1-Student2-Topic1-GradeX
Class1-Student2-Topic1-GradeX

View 6 Replies View Related

Subform Not Updating

Mar 1, 2006

I have a customer subform on page 2 of my inspection log. A combo box at the top allows the user to lookup customers based on name. My problem is after I enter a new customer and part number into the database it shows up in my combo box but I cannot get my two underlying subforms to pull up any information on it unless I close out the form and re-open it. here is a copy of my database and the code I am using for my combo box after update event. You would think the “requery” action fro the subforms would allow me to pull new information with out closing and reopening the form.

Private Sub Combo4_AfterUpdate()
Me.QuerytblSpecTable_subform.Requery
Me.QuerytblPartNumbers_subform2.Requery
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[customer] = '" & Me![Combo4] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
End Sub

Sample included

View 5 Replies View Related

Listbox Subform Problem

Jun 2, 2005

I'd like to know how to make the following:

when I select option 1 from the listbox I get subform 1 in my screen, when I select option 2, id like to see subform 2, and so on....

View 4 Replies View Related

Subform And Listbox To Appear The Same To An End User

Jan 13, 2006

I have been using list boxes in preference to continuos subforms to good effect

however, on certain columns where there is a numeric value, i would like the column date to align right

as i understand i cannot format the alignment of individual columns in a list box, i will then have to use a continuous form instead

thats okay, but i would like the user interface for both listboxs and continuous subform to be the same for the end user

does anybody have any ideas on how to have the continuous subform acting the same as a listbox, in so far as

the mouse pointer staying a pointer rather than a cursor over the rows in a continuous subform

on clicking anywhere on a CS row the event is actioned

thank you

View 4 Replies View Related

SubForm/ListBox Problem

Mar 15, 2006

hey everyone.

I have a form, and this form contains a list box which displays data from a query. When you double click on the list result it displays the results on the form. (This is done by some visual basic code)

The query which is the source of the list box works so that it displays just the results for that client, with this everything is perfect as an individual form.

However this form is a subform for another form and the subform is placed in a tab. And when i load the form it:

1. Can't find the field to filter the list box to each specific client.

2. When i double click on anything in the list table it displays an error "can't find the form 'frm_jobs' referred to in macro expression or visual basic code".

As it works perfectly when the forms loaded separatley. Im a bit stuck to what the problem maybe.

Thank you for any help.

View 5 Replies View Related

SubForm Updated From ListBox

Sep 20, 2004

I have subform which uses a SQL statement as the record source.
One of the criteria (ie. Part of the WHERE condition) is a column value from a ListBox on the MainForm.

Two problems exist:
1. When the MainForm opens, I get a "Enter Parameter Value" window, asking me to input
the value it should be getting from the ListBox. (I suppose this is fair enough, as the ListBox hasn't been
created/populated yet!)
2. When the ListBox is there, when I click on a row, I still get the "Enter Parameter Value" window!
-I'm using a Requery on the Subform's control on the MainForm when the row is clicked.
-A MsgBox within the OnClick event, is giving me the value that the SQL statement should be using!
But the Subform doesn't seem to want to 'see' this value.

Any suggestions?

Thanks.

View 5 Replies View Related

Combobox Updating SubForm

Jun 11, 2005

Hello guru's, I've searched the complete forum for the answer but I just can't find it. I've got a main form with 2 comboboxes on it. The first one filters the second one. What I need now is the 2nd combobox to filter the SubForm. I've tried to add a subform with the wizard but then it shows the complete table instead of only the ones selected in the second combobox.

I've got 3 tables: 1 for classes, 1 for students and 1 for the attendance.
The 1st combobox selects the class, the second one selects the student.
The 3rd table is used to enter absences (date, time, teacher etc) and it should appear in the subform when the student is selected.

Can anyone please give me a little advice? Thanks heaps in advanced! Sebastian.

View 5 Replies View Related

Subform Updating Table

Jul 13, 2005

Hi guys, wondering if you can help because no one I've talked to can so far..

I've got a form with Room information on, and on it a subform. The subform contains information from 2 tables (Items and Audit). Items is basically a list of all the different combinations of furniture item that can exsist (a damaged green chair, a large new desk etc) and as theres only about 70, and 1000's of bits of furniture I decided having common entries would be a better method to save on memory.

Right, the Audit table contains a Room# field and an ItemID field, obviously each furniture item within the Items table has a unique ItemID. The subform is created displaying the information from the Items table, so it tells you that its a damaged green chair rather than just giving you the number 3, and has the ItemID hidden, just for linking purposes.

This works fine for displaying information, but I can't make it so the user can add a new record. If a new furniture item needs to be added then they want to be able to type (new blue chair) and not the ItemID number, so the subform somehow needs to lookup the ItemID from the information typed in as a new record, and then write this ItemID into the Audit table, before refreshing the form. Obviously though at the minute, if anything is added to the subform, it just goes onto the bottom of the Items table, and hence repeats whats already there, which is silly.

I'm just not sure how to go about doing it and would appreciate any help or advice that can be offered. If I've not explained clearly enough please let me know.

Thanks!

View 1 Replies View Related

Subform Requery Not Updating

Mar 17, 2006

Hi,

First post, but based on a long look-around, I'd say that if I can't find a solution here - there probably isn't one! :D And it's probably a simple one as well ...

My problem is the following:
I have setup a SubForm with two dropdowns - the second requerying based on what's selected in the first. It works like a charm when I open the subform by itself, the values update and everything. However, when I place this subform into another form it all of a sudden fails to register, and instead the "Enter parameter values" message comes up, with the seemingly correct Forms!SubForm!Value note. When I type in the value that I've just selected from the dropdown, the second dropdown updates correctly.

I know I must be overlooking something, but I feel I have checked everything I can - especially seeing as it works fine when run by itself.

Thanks for any help or advice!

"5itus

View 3 Replies View Related

Subform Not Updating To Table

Jun 29, 2006

I have a subform in which I use the following statement =forms!frmetc.model It is picking up data that is listed in the form that it is a child of. It picks up the data just fine and shows it properly, but the fields in the table associated with it remain blank. Any suggestions of the right was to accomplish this task? Thank you!

View 1 Replies View Related

Popup Listbox Subform Issue

May 31, 2005

Hi All, Thank you for taking the time to read and/or help.

I have a mainform which I call frm1930Census this form has a tabbed form with two subforms one called sbf1930CenHeader and the other called sbf1930CenDep.

On the sbf1930CenDep form, I have a field called FTMID and a command button which opens a popup listbox search form called LstDepSearch.

The listbox has three columns FTMID, LastName, FirstName. The FTMID field is hidden. The popup form in theory stays open until the user double clicks the appropriate person and then have the FTMID field on the frm1930Census.sbf1930CenDep.fTMID fill in.

This is what I have....

Private Sub LstDepSearch_DblClick(Cancel As Integer)
Forms.fm1930Census!sbf1930CenDep.Form!FTMID = Me.LstDepSearch.Column(0)
DoCmd.Close
End Sub

Any help would be greatly appreciated.

VanEpps

View 6 Replies View Related

Forms :: How To Add Listbox Contents To A Subform

May 11, 2015

I have five list boxes set to a table in my database. Here is what a few rows in my table look like...

ID IngredientName IngredientType Cost
1 Ham Meat $1.23
2 Beef Meat $3.45
...... ....
27 Lettuce Vegetable $0.22
28 Onion Vegetable $0.12
..... ....
38 Mayonaise Sauce $0.13

The five listbox controls each show the list by the IngredientType, so one listbox shows vegetables, another Meat, and so on. Multi-select is turned on for each listbox. Here is what I want to do: In the form I want to have a subform that will show what the user clicks in listboxes. This running list, with an extra column next to it that will accept a number. Example: say the user selects 'Ham' from the meat listbox. The subform should then show 'Ham' and a space next to it where he can type an integer (allowing for more meat).

Subform:

Ham | 2
Lettuce | 1
Mayo | 1
Subroll | 1

If the user de-selects the item in the listbox I'd like the subform to delete the item from itself.

View 13 Replies View Related

Forms :: Go To A Record On SubForm With Listbox

Jun 28, 2014

I have a Listbox that I want to use to go to a record on a subform. I know that it cant be done with the wizard.

The records that I am looking at don't have an ID so I want to look at both a date field [TrainingDate] and a Time Field [TrainingTime]. I have set the querry up and the list gets populated with the correct information. And I have added the following code to the AfterUpdate Event

Code:
DoCmd.SearchForRecord , "", acFirst, "[TrainingDate] = " & Str(Nz(Screen.ActiveControl, 0))

The reason that it has no RecordID is that the records could be imported and that would produce duplicates.

View 1 Replies View Related

Dates Not Updating Subform RecordSource

Jul 25, 2006

Hello,

I have a dropdown menu which has a lisrt of dates (mmm yyyy), and when one is selected it updates 2 boxes with 01/mm/yyyy and 30 or 31/mmm/yyyy

Private Sub cmbDate_AfterUpdate()
Me.frmData.Form.RecordSource = "SELECT * FROM qry_NatxReg WHERE [Company Name]='" & cmbCompanyName & "' AND [Time of Attempt 1] BETWEEN #" & txtDateFrom & "# AND #" & txtDateTo & "#"
Me.frmData.Form.Requery
End Sub

When i choose June, it works fine and gets all the june dates from [Time Attempt 1]

But when i Choose July, it includes June.

I only have data for June and July as it's still in testing.
I can't wrap my head round it!!

View 12 Replies View Related

Help With Combobox Updating Subform Code...

Aug 14, 2006

Hi well baisically the title explains the dilemma... I have a combobox in which the user selects an item and this updates the subform depending on the selection. However when i make a selection i get the following error:

Rumtime error '2101':

The setting you entered isnt valid for this property.


I understand what its telling me, however i cant seemed to find within the code where i have gone wrong, so heres the code:

Private Sub Combo4_AfterUpdate()
UpdateSubform

End Sub

Private Sub UpdateSubform()
Dim strSQL As String
Dim varWhere As Variant

varWhere = Null

strSQL = "SELECT * FROM Sub_qry_CostCentre"

If (Me.Combo4 > 0) Then varWhere = " WHERE (CostCentre = " & Me.Combo4 & " )"
' MsgBox (strSQL & varWhere)

Me.Sub_frm_CostCentre.Form.RecordSource = strSQL & varWhere
Me.Sub_frm_CostCentre.Form.Requery

End Sub

Private Sub Form_Open(Cancel As Integer)
UpdateSubform
End Sub


Anyhelp will be much appreciated, i have been stuck on this issue for a number of hours and is becoming increasingly frustrating..

thanks

View 3 Replies View Related

Unrelated Subform Not Updating Automatically

Oct 22, 2006

This may be a simple question, but I'm not sure what to even search for. I have a form with multiple subforms. All the subforms have related fields that are linked via relationships. But one subform has no fields in common with the parent form.

I need to be able to have the subform update itself whenever the record is changed on the parent form. I can't figure out which event procedure to use. It updates correctly if I assign my procedure to the form_click sub, and then click each time I want it updated, but that's a pain. I've tried on load, on data change, on activate, on data set change, and a couple others, but nothing works automatically.

How can I make the subform run a subroutine each time the parent form changes records?

View 4 Replies View Related

Updating Table From Form And Subform

Oct 19, 2005

I have a form to enter records in a table of staff attending training courses, in the form is a sub-form based on a query from a different table. When a staff number is entered on the main form the staff name grade etc appears on the sub-form, my problem is that I need the table to be updated from the main form and the sub-form. Is there a way of doing this?

Thanks

View 1 Replies View Related

Passing Multiple ListBox Selections To Subform

Sep 21, 2005

Using Access 2003.

I will have a ListBox on the form with “Multi Select” set to either simple or extended. I have a collection of documents which must be recorded in a database. Some documents may have only one author, but could have more. Same with the recipient or copied-to.

Ideally it would be nice to have the ListBox on the left, selected one or more from the list and then pass them to one of the three fields by a command button, sort of like:

cmdAuthorAuthor1
LISTBOXcmdRecipientsRecipient1; Recipient2
cmdCopiedTo Copy1; Copy2; Copy3

I would like to have all of the names selected from the ListBox as a string, but fully understand the problems associated with normalization. Other posts have suggested subforms. So, the question is how to select from the ListBox and then pass the possible multiple selections to discrete fields on a subform that would display, say three fields and which would get away from the normalization issues:

cmdAuthor [Author1] [ ] [ ]
LISTBOXcmdRecipients [Recipient1] [Recipient2] [ ]
cmdCopiedTo [Copy1] [Copy2] [Copy3]

The secondary issue will be that there will be subsequent names which are not found until actually in the process of document review which will create a need to update the ListBox, which I know is not akin to a ComboBox NotInList function.

If there are any thoughts or coding out there which will help, it’d be appreciated.
Lawguy

View 1 Replies View Related

Am I Missing Sumting? Listbox Requery Subform

Nov 13, 2005

can any1 tell me y im missing in my db?
look at Monthstock form...

plz tell me step -by-step how to do it..plz..im new

View 7 Replies View Related







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