Forms :: Syncing List Box With Main Form

Dec 26, 2013

I have a list box populated with the movie title of my movie database. The form, which is based on the same table, shows the movie description in a memo field. Currently, in order to sync the list box with the main form, I'm using the following code in the AfterUpdate of the list box:

Code:

Private Sub lstDvd_AfterUpdate()
Dim rst As DAO.Recordset
On Error GoTo lstDvd_AfterUpdate_Error
If Not IsNull(Me.lstDvd) Then
Set rst = Me.RecordsetClone

[Code] ....

It works fine when I select a row in the list box. But, when I use the navigation buttons at the bottom to move to another record, only the main form moves to the next record (obviously). How I might sync the list box and the form when I move the form to another record?

View Replies


ADVERTISEMENT

Forms :: Requery Control On Subform From Main Form - Refresh List?

Sep 8, 2014

I have a form called Add New Delegation, i have combo box of Institution names on the main form and a subform for Agreements discussed. with a combo box called agreements. I successfully cascaded the combo boxes so that the agreements discussed on the subform are filtered by their respective institutions on the main form. However i am unable to refresh the list each time a new institution is selected as the Macro will not allow me to requery a control on the mainform from the subform..

View 2 Replies View Related

Forms :: Subform - Combo Box List Not Populating According To Main Control

Apr 17, 2014

I am using MS Access 2010, I have three tables,

Policies (Id, Client Id, Address, Policy Amount, Paid)
Payments (Id, Client Id, Total Amount)
Payment Details (Payment Id, Policy Id, Paid Amount)

I have created a form "PAYMENTS" that include a sub form "PAYMENT DETAILS".

In the sub form control Policy Id is defined as combo box, and retrieving the list from Policies and Payments where Policies.Client=Payments.Client the query of Combo Box is as follows:

Code:

SELECT POLICIES.[POLICY ID]
FROM POLICIES
WHERE (((POLICIES.PAID)=False) AND ((POLICIES.CLIENT)=[Forms]![PAYMENTS]![ClientId]));

Only first time Combo Box display the Policy Ids according to the Client, but when I change the client and always displays the previous clients Policy Ids.

how to retrieve correct list of Policy Ids according to the Input Client in Payments.Client control

View 4 Replies View Related

General :: Unbound Main Form - Manage Items In A List Box

Feb 20, 2014

I have a list box on an unbound main form, which contains a rowsource consisting of files in a certain folder. The listbox is unbound

when I change an item in a subform, the listbox should update to show different items from the same folder.

Now it is updating correctly, so the rowsource appears to be correct, , but then the listbox behaves strangely - with the first item being sort of permanently selected - or at any rate - strange selection behaviour

out of interest, changed it to a combo box and it works correctly. so there must be some difference between the two?

After investigation, it might be this : [URL] ....

The appearance is similar to what is described in the thread.

although I have played with the strings to get them shorter without getting it work correctly. very strange

if I run the code to update the listbox from the subform, either directly, or by running as sub IN the main form, it produces this strange behaviour. If I run exactly the same code directly IN the main form, it seems to work properly.

View 14 Replies View Related

General :: How To Sum Amounts In List Box Column And Show Total On Main Form

Oct 19, 2012

How can I sum the amounts in the list box column and show the total on the main form?

View 2 Replies View Related

General :: Obtain Totals From Two Columns In List Box Into Text Boxes On Main Form

Oct 27, 2012

I am trying to obtain totals from two columns in the list box into text boxes on the main form, but my third argument is not working as expected.The source of one of the tex boxes is:

Code:
=DSum("Airtickets","T_Training_Participants.ProgrammeID=Me.lstParticipants")

I want to sum only amounts of the records that equal or belong to a selected programme (ProgrammeID) in the bigger list box above.

View 2 Replies View Related

Database With A Main Menu Form Containing A Button That Loads Main Data Entry Form

Jun 24, 2015

I have a database with a Main Menu Form, containing a Button that loads my main data entry form. When the Button is Clicked portions of the data entry form that is loading shows through the Main Form Background (e.g. portions of the navigation bars, and portions of the boarder on the form that is loading.)

View 5 Replies View Related

Why Is Main Form Update Event Triggered When Subform Dirties Main Form?

Dec 1, 2005

I have a subform which makes a change to a field on the main form. When focus is returned to the main form, the BeforeUpdate and AfterUpdate events fire. Why? I thought from the form's perspective, the subform is just another control.

BTW, I get the same behavior if I modify the field from within the Exit event of the subform control.

In either case, the main form's Dirty event is NOT triggered.

View 2 Replies View Related

Forms :: Default Property / Using A Control Of Main Form Without Using Names Of Forms?

Nov 8, 2013

In the default property of a subform control I want to use a control of the main form without using names of forms, but using me and parent.

I used in default property of cboVATDetail: =Me.Parent!cboVAT, but it is not accepted. My aim is to use cboVAT of parent as default in cboVATDetail of child.

View 3 Replies View Related

Forms :: Relating Information Between Main Form And Navigation Forms

Apr 11, 2013

New to the navigation form: I need several forms in the navigation form to all relate to the same client ID field. I have this information on the main form but the form with in the navigation form will not pick it up.

I have tried =[Forms]![Frm Client Information Navigation Panel]![ClientID] But just cant get it to pick up that information...

I would like to have something like the master link fields and, child link fields but when I add a form to the navigation form this option in not available.

View 1 Replies View Related

Forms :: Open Blank Form Based On Value In Text Field In Main Form

Jun 6, 2013

I have one table containing name of restaurant with its address etc. Then i created another table to list out the restaurant workers names and details. Just as an example,

Table:Restaurant
Restaurant name
Address line 1
Address line 2
Restaurant #
Website

Table:StaffContact
Staff Role
Name
speciality
email
phone

I have the main form that has all the restaurant details only. And i have another form containing the Staff information. Please note the two table have a relation and it works well.

Now to make it user friendly(basically easier for the lazy ones), I dragged the staff contact form on to my main form and displayed it as a datasheet(basically a sub form).

Now, my boss does not want users to add/delete on this sub form(datasheet). So,he wants me to create buttons to open new record of staff for each restaurant(new form)

My issue is with opening a new record to enter a new person to the staff list and give them a role as well in form view.The new form has

So i ran a Macro, with open form with Where condition

Code:
[Staffcontact]![Rest Name]=[Forms]![MainForm]![RestaurantName]

But, it does not work .

View 2 Replies View Related

Main Form / Sub Forms

Oct 19, 2005

I have a command button on a main form which on 'on click' enables a number of fields on the main form that were previously enabled = False to be enabled = True.

The problem is I also have a sub form within the main form where I want to do the same. (A number of fields within the subform are also set to false and I want them to go to True) I can set a seperate button up on the sub form to do the same but I would much prefer the button on the main form did the whole lot.

The problem is I haven't a clue to the VB of how to include fields within the subform as well as the ones on the main form.

For info the main form is called FrmTblMain and the sub form SubFrmProject

The fields on the subform that I wish to set to true are 'First' and 'Second'

Any help will be appreciated.

View 3 Replies View Related

Forms :: Main Form Which Contains A Sub Form In Data Sheet View

Nov 28, 2013

I have a main form (tsTimeSheetMain) which contains a sub form (tsTimeSheetDataNewSub) in data sheet view. When I click off one row onto another row in the sub form, it triggers this code:

Forms!tsTimeSheetMain!ProjectMonSum.Requery

i.e. it tries to requery the ProjectMonSum field (on the main form) which is a dsum calculated field. This works fine and updates the ProjectMonSum field (which dsums values from the same datasource as the subform.

However, this seems to put the cursor back to the top left field in the subform (datasheet view), rather than leave it in the field I click on (in the subform).

Why is this happening and what is a decent workaround this issue? I just want to update the calculated dsum field each time you update values in the subform.

View 8 Replies View Related

Forms :: Send Data From Pop-up Form To Main Form (sub-sub Form)

Aug 27, 2014

On the form: User enters first name, then last name. Upon updating the last name field, I would like another form to pop-up and display all the people with that same first name and last name that the user just entered.

On the pop-up form: All of the matching first names/last names are listed with a button control beside each record that says 'Select'. The user clicks the select button beside the record he/she wants. This pop-up form closes and all of the data from this selected record is now showing on the original form.

So far, I have a query/form that pops up only showing the matching first/last names. I'm having a hard time getting my original form to auto-populate with that record that the user selects on the pop-up.

(Also my main form is actually a sub-sub form - so in my trials I could've been massacring my syntax trying to point to it.)

View 5 Replies View Related

Forms :: How To Get Main Form With Subform

Sep 27, 2013

i have a main form for customers and a subform for sites which is set to locked so its displayed as just a list. I have a button on my main form to add a new site for the current customer displayed..How can i get the Main form '1CustomerDetails' with subform '2SiteList' to automatically refresh one i've clicked the save button on another form.

View 1 Replies View Related

Forms :: Navigation Form - Main Form Buttons

Nov 23, 2013

So I have made all the necessary forms to start working with my Access, and now I need a main form, a home where I should put all the buttons to enter each form.I have used the Navigation Control on a New form URL...

A row with buttons appeared, and I complete the property: Navigation Target Name with the target form, but it is giving me some trouble with a searchForm and a Query. Every time I enter this form (using nav control), Query asks for an Input.

View 2 Replies View Related

Forms :: Picking Up Sub Form Totals From A Main Form?

Mar 22, 2013

I have converted an old Access 97 database to Access 2010. Mostly it works fine but I have a major issue with the invoicing forms. It was working in the old database but I cannot get it to work in this version.

I have the usual invoicing option where the lines of the invoice are displayed in a sub form for that customer and line totals calculated. This works fine. I have a sub form total text box in the footer of the sub form which I want to pick up from the main form so that I can add the delivery charge and VAT.

View 6 Replies View Related

Syncing Tables

Dec 4, 2006

I have source data in a table in an excel sheet.
Amongst other things, I need to store a copy of that data in a table on a sql server database.

How can I sync these?

Here is what I have come up with,

Q1 delete from local table
Q2 append local table from excel data
Q3 delete from sqlserver left join local data where local id is null
Q4 append local data left join sqlserver into sqlserver where
sqlserver's id is null.

I do the Q3/Q4 delete and append, because copying the full table takes aorund 20 minutes, but in reality only about 100 records change from day to day, and Q3/Q4 runs about 2 minutes.

This works, BUT, it is possibly that the excel data could be empty, at which point, I would want to keep the old data on the sqlserver. The sequence above would erase the old data.

So two questions
1) is there a way to sync the excel source with the sqlserver destiantion without using the local copy?

2) Is there a way to preserve the sqlserver data if the excel file is empty?

Thanks,
David

View 4 Replies View Related

Forms :: Subform Does Not Associate With Main Form

Mar 15, 2013

I have this form that contains subforms to hold different types of infomation for different clients. At the top of the form it has the case #, first name, last name, and then a tab element in which each of 6 pages (tabs) holds subforms for other information associated with the client.

I have a table that holds only client number and name.Then each of the six subforms operate off of a table, and all the tables are connected through relationships using client number, first name, and last name.

How could I make the subforms autofill their cooresponding tables using the case #, and name fields from the main form without having to repeatedly input the client #, names for each tab/subform?

View 4 Replies View Related

Forms :: Connecting Main Form To A Subform?

Apr 21, 2015

I have a form that shows information on a person (think first name and last name) at the top and contains tab controls that hold subforms each containing a different set of info about that particular person. Ex: for person 1 the main form will display the persons first and last name as well as show the subject tabs. as you click on each tab you should see the information that pertains to that person. I would like to step through each ppeson one at a time using the horizontal record arrows (eventually I will change this process to using forward and back buttons) on the main form with the persons names changing as well as the information in the subforms changing to match the person on the main form. I can step through each separately (main form and each subform) but I cant get the subforms to change information when the main form changes persons. Seems simple enough but I cant get the subform to change when the main form changes. They are not connected. This is for an Access class that I am taking and we use Access 2013.

View 2 Replies View Related

Forms :: Navigating To A Record In Main Form

Aug 10, 2013

I have a form and a subform for data entry.It is often the case that not all the data may have been entered and so a user might need to go to recordID 24 in 30 already entered main records.However, he needs to get to that record via a (unique) 1-1 field. How do I create the form so that as well as being able to go to the first, the last, the next, the previous record, I can go to a record of my choice.

View 5 Replies View Related

Forms :: Filter Subform From Main Form

Jun 27, 2013

All using 2010. I need to filter a subform from the main form.

Code:
sfrmMedCInfo.Form.Filter = "[SSNum]= '" & cboSSN & "'"
sfrmMedCInfo.Form.FilterOn = True

It's throwing an error: Variable not defined pointing to sfmMedCInfo. why do I need to declare the subform and how?

View 3 Replies View Related

Forms :: Recalculate Field On Main Form

Feb 17, 2014

I have a form with a subform. The main(parent) form is called Quotations and the subform is called QUOT_DET. On the subform I have two fields bound to a table. The fields are QTY and Price. On the main form I have a field called QUOT_TOTAL which basically is bound to the Quotations table. Through On Afterupdate on the subform I refresh this total on the main form. The problem I have is that I want this field (QUOT_TOTAL) of the parent form to immediately refresh/requery etc when a user changes the QTY on the subform. The QTY is the first column of the subform. The QUOT_TOTAL only refreshes when I reach the end of the row. I do not want that - I want it to refresh immediately after the user changes the value of the QTY field and the Price field.

View 3 Replies View Related

Forms :: Calculated Field On Main Form

May 31, 2013

I have a main form with several with four subforms. On the main form I have a bound text box [ShiftTotal] I have on each subform a unbound text box that sums a field [ExtTaxIn]. I am working with just one subform till I can get it to work correctly. The code I am using on the after update event is as follows.

code

Private Sub TxtSoldQty_AfterUpdate()
On Error GoTo HandleError
Me.ExtTaxIn = (Me.TxtSoldQty * Me.TaxIn)
Me.ExtPrice = (Me.TxtSoldQty * Me.Price)
Me.InvSold = (Me.TxtSoldQty * Me.UnitOfSale)
Forms!frmShiftMain!TxtShiftTotal = Forms!frmShiftMain!TxtRunningTotal
Me.txtExtTaxIn.Requery

[code]...

This sort of works but the [ShiftTotal] on the main form is always one table row behind. I think this is because of the order the event fires.

View 2 Replies View Related

Forms :: Can Use Main Form As Query Criteria

Mar 10, 2014

I am working on a warehouse database and i have run into a small problem. I am using access 2010 and 2007 depending on location.

I have attached a picture of my database relation ship so you can see where i am coming from. What I am trying to do is make a main form called products and use that as the sours of the information that my queries look for and then have linked pages to my main form showing the results of that.

Example of the above would be as follows

Product on main form lets say tennis ball red then on my link forms show stock plus location and quantity

On another linked form product on main form and orders for that product and qty

View 3 Replies View Related

Forms :: Unsaved Record In Main Form

Jul 16, 2013

I have two forms, the first of which I'll refer to as my "main" form. The main form has 6 text boxes bound to Table1.

There is a one-to-many relationship between the records of Table1 and the Dates table.

After filling out the first 2 text boxes of the main form, I want to open up a second form to populate the Dates table. I'm using OpenArgs to pass through the PK of Table1, so that it can be recorded in the Dates table.

Sometimes I'll want to enter a 2nd or 3rd date, but I am getting an error message after entering the 1st date. It says that Access cannot find a matching key in the main table.

Is there a way for me to save the record in the Table1 prior to opening. The second form so that I can avoid the error message?

I don't want to use a subform to enter the dates because I don't care for the datatable look of subforms. After entering the dates in the second form, I then want to go back to the main form to complete entering the remaining text boxes.

View 7 Replies View Related







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