"Refreshing" Subform From Combo Box

Sep 27, 2005

I am working on an employee time database. I have a form named time card and a subform named time card subform. In the time card form, when you select an employee from the drop down combo box (named employeeID), I want the subform to "refresh" itself to only display the time card for that employee which you selected in the employeeID combo box. Each employee has a specific time card ID which is what really needs to be refreshed, I assume.
I have done hours worth of research in this forum and have not found the answers I needed to get this going. I don't know what I am trying to do is actually called refreshing. I found the time and billing database floating around the internet and was going to use that for some guidance but that doesn't work either. I hope I have supplied enough information, if not just reply and I will give some more details. Any help you can provide would be appreciated.

View Replies


ADVERTISEMENT

Subform Not Refreshing

Jan 27, 2006

I have no VB skills at all have to do everything with macros etc. So please keep any replies simple. I have a database for students, courses and tutors - all worked fine until the customer wanted each student to do 2 courses at a time. The whole database is designed for statistical returns ie females with child care responsibilities living in a rural area etc., and the Course Id has to be the same on each course table. I split the course table into 2 tables with the same data, made a course entry form which appends new courses to both tables. My problem is that when I select a course ie no 234 for course 1 and 345 for course 2 I cannot get the subform to show the data unless I go to the next/previous record and back again; when I do this the main form opens at record 1. Is there a macro or piece of code I can use to automatically refresh OR a macro that will go to next record and then reopen the mainform at the place where I started?

View 1 Replies View Related

Refreshing Subform Data

Jul 31, 2005

G'day,

Currently I have a button on my form that opens a second for to Add a New Temp Worker. This all works fine but when I close the form and go back to the entry form the subform hasn't been refreshed and so the new temp isn't in the list. I can't close the form that contains the subform as it will stuff up the data entry.

Can you please help?

Bizzy

View 14 Replies View Related

Stop Combo Box Refreshing

Oct 6, 2004

I have a form with a combo box on it, used to select staff members.

When I select a staff member it displays a list of tasks assigned to this staff member in a sub-form.

This is all working as I want - however, when another user (on another computer) selects a different staff member from the combo box, after a short time, that second staff member is displayed on my screen and consequently the second users tasks are aslo displayed.

How can I stop this combo box updating every time someone else selects a value?

Thanks,

Brad

View 8 Replies View Related

Refreshing Form After Deleting From Subform

Apr 27, 2006

Hopefully a quick one, this.

I have a form containing a subform, as a datasheet. The form displays the full details of whichever record I select in the subform.

When I click on a button to delete a record that I've selected in the subform, it vanishes and the subform row that displayed it is cleared. I have a figure displaying the total count of rows in the subform (thanks to Ghudson for that one) and this also reflects the change. the form, however, still displays the details it previously did.

As the last line in the code behind the button I have:

[Forms]![form name].Requery

however, when the code runs and hits this line, it displays a message that says

'Runtime Error 3167: Record is deleted'

Without this line, the form doesn't refresh (obviously) and I get no error messages, but when I next select any row in the subform I get a message:

'Record is Deleted'

and all the fields in the form display 'Deleted#'. Selecting another row fixes the problem.

It seems pretty clear that I'm not refreshing the form correctly, but in spite of searching the forum and finding a fair few threads on this topic I can't work out the syntax I should be using.

Hopefully, someone more knowledgable tham me can point me in the right direction.

View 1 Replies View Related

Subform Not Refreshing Data Dynamically!!

Oct 6, 2006

I am using a subForm inside a parent. The subform is in the "dataview" format and it shows the data of a particular table (say 'Processus'). What I want to do is, when I insert a data from the parent form into the table processus, I want the child to display the the new record dynamically...

Is this possible? Is there a property like child.refresh ??

View 5 Replies View Related

Forms :: ComboBox Refreshing Subform

Aug 17, 2015

I am trying to use a combo box to refresh a subform. I am working with Access 2007 as my front end and SQL 2014 on the back end. On my main form called frmDealers I have an unbound combobox where the user selects a dealer and then text boxes are populated with address and phone number. I have it unbound because I don't want the user to make changes to the dealership at this point. On the subform I have people that work at the dealership. That form is called sfrmDealerContacts. The subform could have multiple contacts for each dealership. The subform is bound to a query called qryDealerContacts. I have it bound to a query because I want email hyperlinks in the table too. I tried searching the forum and found this thread number 279791.

After searching I added:

Form_sfrmDealerContacts.Form.RecordSource = "SELECT * FROM dbo_DealerContact WHERE DealerID = " & Me![cboDealerName].Column(1)

But this brings up an input box so I must have something wrong. My code is:

Private Sub cboDealerName_AfterUpdate()
Me.txtDealerAddress = Me![cboDealerName].Column(2)
Me.txtDealerAddress2 = Me![cboDealerName].Column(3)
Me.txtDealerCity = Me![cboDealerName].Column(4)
Me.txtDealerState = Me![cboDealerName].Column(5)

[Code] .....

View 2 Replies View Related

Refreshing Cascading Combo Box Queries

Apr 25, 2008

hi,
I have a db which uses the data taken from cboInstructors which is used in a query and a produces a list in cboExpertise. This procedure is repeated from cboInstructors for cboAssessors and then cboIVName.

This subform then shows all the modules each student have taken, who taught it, who assessed and who IV'd it. The problem is when one selection is made all the subsequent choices are the same as the cbo above it, i.e. the queries do not run again when a diferent selection is made in cboInstuctors.

I hope this clear.

Help please.

Iain :eek::confused:

View 7 Replies View Related

Problems With Refreshing On Exit From Combo Box

Oct 10, 2006

Hi-
In a subform, which is based on a query with two tables, I have a combo box (Field36) that is used to select a name. In the OnExit event, the following code is used to refresh the remaining fields on the subform:


Private Sub Field36_Exit(Cancel As Integer)
On Error GoTo Field36_Exit_Err

DoCmd.RunCommand acCmdRefresh

Field36_Exit_Exit:
Exit Sub

Field36_Exit_Err:
MsgBox Error$
Resume Field36_Exit_Exit

End Sub

We recently changed the name from one field to two (first, last), and now the Row Source for the combobox is:
"Select( [last name] & ", " & [first name]) From [INTRPTBL];"
The Control Source is one field (link name) in a table, and I want both names to end up in there.

The problem is, the code no longer works. Since I'm testing things, I only have one record in INTRPTBL. The data from that record shows up in every line of the continuous subform, regardless of the name that was chosen before. When I try to choose from the combo box, it won't allow me to click on the name, all I get is an angry "ding!"
I'm assuming this has to do with not being able to refresh based on the name in Field36. How can I set it up so it can bring up the appropriate information based on the last, first combination (which are two different fields in the table).

Thanks so much!

View 1 Replies View Related

Refreshing A Query Based On A Combo Box Selection

Dec 1, 2004

I have a form on which i make a selection. This selection then populates a query which in turn generates a report. The problem that i have is that when i go back into my form and make another selection the query, and therefore the report, holds the original data.

My question is how can i refresh the selection and therefore produce different reports based on this selection without exiting the application?

Many thanks for any help provided in advance.

View 4 Replies View Related

Forms :: Subform Is Not Refreshing / Updating New Information From A Combobox

Jul 17, 2013

I have a mainform in access with a subform (continous form mode). The subform's source is a query that has a criteria parameter that gets the values from a combobox in mainform.(list of projects) Combobox name= cmbProject

It works fine for some records (old records), so when I migrate new data into the table the comboxbox display the new data but when I select the record to be dispayed on the subform, the record or data is not in the subform, so the record is in blank.

View 1 Replies View Related

Forms :: Filtering A Combo Box On A Subform From A Combo Box On A Main Form

Apr 27, 2013

I have a Suppliers database which contains a form that will allow me to place orders with Suppliers.The Main form has a combo box that allows me to select the supplier. The combo box is called SupplierID with the following:

Row source: SELECT Suppliers.SupplierID, Suppliers.CompanyName FROM Suppliers ORDER BY Suppliers.CompanyName;

The subform is called Stock Subform witha combo box called ProductID with the following:

Row source: SELECT DISTINCT Products.ProductID, Products.ProductName, Suppliers.CompanyName, Products.Discontinued FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID=Products.SupplierID WHERE (((Products.Discontinued)=0)) ORDER BY Products.ProductName;
Event Procedure - AfterUpdate: Private Sub ProductID_AfterUpdate()
On Error GoTo Err_ProductID_AfterUpdate
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "ProductID = " & Me!ProductID

[code]..

The Link fields are done on the Purchase Order ID (PONoID).What I want to achieve is to select the supplier from the combo box (SupplierID) on the main form and then the combo box (ProductID) on the subform to filter to only show products directly supplied by the Supplier selected on the Main Form.

View 11 Replies View Related

Forms :: Get Subform To Requery After Choosing A Name From Combo Box On Subform Itself

Jul 26, 2013

All I am trying to do is get a subform to requery after choosing a name from a combobox on the subform itself, thus updating the records on the subform. The main form name is "BasicTestOneF" the subform name is "ICminiBasicF" and the combobox name is "Combo4"

I have the combobox requery on After Update, but I still get the "Enter Parameter Value" popup. I've spent the last hour and a half just trying to get this simple thing to work and have gone through I don't know how many sites and forum posts, tried every combination of VBA code I've found, and I still can't get it to work.

View 14 Replies View Related

General :: Subform Combo Box Restricted By Form Combo Box

Mar 28, 2014

I'm an Access newbie and I'm having trouble restricting a combo box on a subform based on the selection of the combo box on the form.The combo box (Combo1) on the main form (FrmOrganisation) gives a list of companies, I want the combo box (Combo2) in the subform (SbFrmEmployees) to list people only from that company. I then have a subform within that subform that displays information about the employee.

View 3 Replies View Related

Combo To Filter Subform From Another Subform?

Feb 2, 2015

Main form frmSiteDetails

frmRooms (subform) holds Room information for the rooms on each floor. This form has LinkMasterField [SlaveFloorsID] and LinkChildFields [FloorsID]

frmFloors subform holds floor information for each floor in a property. This form has LinkMaster [SiteID] and LinkChildFields [SiteID]

Both these forms sit on a Tab Control (TabCtl57) and do work properly.

What I would like to do is to also have a Combo to pick a floor number from frmFloors and filter frmRooms. Both these forms have FloorsID fields. This would save a user having to go back to frmFloors to pick a different floor and then go back to frmRooms to view the room data for the new chosen floor.

View 2 Replies View Related

Refreshing From Pop Up

Jun 17, 2005

Hello all I hope that you can help

I got a database that has lots of subform which are all locked, I got a button that open the same subform in a pop up form with a macro that insert a new record. But when I close the subform after puting the information in the new record does not update on the main form untill you go away from the current record and come back again

Any Ideas

Postieman

View 1 Replies View Related

Combo Box Within Subform

Sep 18, 2006

hi, i have a combo box in a subform.

the value of the combo box is depanding on the main form.

i want the list in the combo box can be displayed but the value of the combo box must not to be edited.

how i can do this? cann't use combo1.enable = false as the list has to be displayed. please help.

View 2 Replies View Related

Combo Box/Subform

Apr 6, 2005

I have created a main form containing information on classes that I conduct. On this main form I also have a subform containing student information related to the class. Within the subform there is a combo box that contains student’s license number, when this number is selected from the combo box all fields in the subform are automatically populated. When I enter a license number that is not in the db the NotInList function opens the students form, information is entered into the students form then closed returning to the subform. However the fields in the subform are not automatically populated. This is my first post I hope I have attached a copy of the database.



Please help! I have been reading and working for a solution for a Long….Long…….Long………Time.



Thanks

Mike

View 2 Replies View Related

Refreshing Subforms

Nov 22, 2005

Hi there.
I have a form with two sub forms on it. The form loads with a reference number that I pass to a function that in turn requeries the first sub form. The function call is in the on load event of the main form.
This part works fine.
The second sub form uses a similar requery function to the first one. The only difference is that the query for the second sub form is based on a reference number from the selected record in the first sub form.
If I put the function call for the second sub form in the on click of the first one all is well and the second sub form displays all records with a matching reference number.

The problem is that when the main form loads the first sub form will display the correct data but the second remains blank or displays the wrong data.
I know this is happening because the first sub form has not loaded fully and so the second sub form cannot get the reference number. I just can’t find a way to make the second sub form display the correct data when the main form loads.

I have tried calling the requery function for the second sub form from most of the events on the main form and many of the events on the first sub form but to no avail.
I also tried putting a meaningless sub form at the bottom of the main form and putting the requery function for the second sub form in the on load event but that was no good either. This surprised me as until that point I was assuming that access was loading the sub forms sequentially from top to bottom.

Can anyone tell me how I might determine the point at which the first sub form has been loaded so that I can get access to the reference numbers needed for the second sub form query. I would prefer not to use a timer for this as there is no way to determine the maximum time it will take access to load the rest of the data but at present it looks like the only option left.

Any comments would be much appreciated and sorry for the lengthy explanation.

View 6 Replies View Related

Refreshing ActiveX

Nov 24, 2005

I just added a ActiveX control to my program and I have a scroll mouse, and there when the user used the mouse to scroll through the records, the record changes but the ActiveX Control doesn't. My activeX Control is used for a digital signature. Anyone Have any ideas?

View 2 Replies View Related

Refreshing A Database

Jul 27, 2006

This is a lot more complicated than the title suggests. I was asked to reset the work order numbers used by the maintenance department. When they reach work order #9999 they want to start over. My best bet is to make a backup of the tables and create new ones that include the last 2-3 weeks of activity. If I do that I'll have two potential problems:

The next autonumber needs to be lower than the pre-existing records but not start at 1
Recombining data from the old table (for whatever reason) will create false relations

Does anyone know a possible solution to these problems or is there a better method to refresh the database?

View 8 Replies View Related

Self Refreshing Query

Apr 1, 2007

I have a 'Snapshot' report, which gives up-to-the-minute data on a business - sales year-to-date, month-todate, week-to-date and today. They run this many times a day, but ideally, they would like to have the information display on a monitor, and be updated automatically every few minutes.
Is there any way that a query can run by itself every few minutes, and gather the current information?

Robert

View 4 Replies View Related

Refreshing ODBC

Jul 4, 2007

Hi Guys

Quick question, in Access 2007, i created a table that pulls data out of our system via ODBC. No if the system gets updated, how do i refresh data in access? Please advise. Thanks in advance.

View 1 Replies View Related

Refreshing A Form

Feb 24, 2005

I have an orders form which contains an items subform.

To populate the items subform I have a button which opens a separate pop-up form.

Is there a piece of code which would allow me to click a button on that pop-up form which actually refreshes the other opened form (orders form)???

Anyone know if this is possible?

Thanks,

Paul.

View 2 Replies View Related

Refreshing OpenArgs?

May 16, 2005

Hi all,
I have a form (sub_Main) that opens and has an openargs value (Department) from my main form when user clicks on a cmd button. However, if I were to go back to my main form and click on another department the openargs value is not passed along. I have tried using Me.Refresh under LostFocus but it doesnt seem to work.

What is causing the openargs value from updating? Any help?

Thanks!

View 5 Replies View Related

Refreshing Fields

May 26, 2005

Hey All,

I have a field "NameView", irrelevant but it grabs a name from a seperate form from an ODBC connection.
The purpose for the field is simply to grab the data from another form.

On the same form As NameView theres another field "Name"
This Grabs the data from NameView and writes to the main table.

Everything works fine but "Name" will only update from "NameView" on a new record only and not on the current one.
I have a VBA Statement on an afterupdate which Me.Name = Me.Nameview

I've tried Me.Refresh and Me.Requery but no help.

Any thoughts?
Much appreciated
Thanks

View 4 Replies View Related







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