Change Query In Subform

May 3, 2007

Another one I'm struggling with.
I have a mainform and a subform. What I want to achive is :
click on a lable (lab1) in the mainform and set the recordsource ( query1 ) in the subform to display relevant data.
Click on a lable ( lab2) in the mainform and set the recordsouce (query2) having different data than query1 in the subform.

Hope this make sense.

How would I do this.

View Replies


ADVERTISEMENT

Change Subform Recordsource

Sep 4, 2006

I have a form with 5 tabs. Each tab has 2 subforms.
When the form loads I am trying to select it's recordsource by doing this:

Me!Subformname_A.RecordSource = "SELECT FieldA, FieldB FROM TableA WHERE"

However, it throws an error.
Is there something wrong with this ?

View 1 Replies View Related

Change A Subform Based On A Value In Mainform

May 1, 2005

I have a main form with a control that can take one of three values. And I would like to add a subform that work as follows.

Selecting each value should change what the subform displays like this.
Control Subform
A Select * from TableA where Key = "A"
B Select * from TableB where Key = "B"
C Disable subform somehow because it doesn't apply

Could someone please provide some advice on how I could do this.

Thanks

Fearless

View 1 Replies View Related

Subform Problem After Table Name Change

Aug 12, 2005

A user recently made a change to a table in an Access 2000 db (I know, but I’m a volunteer and the org’s a nonprofit that insisted on access to the tables, etc). First he copied the table and renamed it ("basicdata--orig"), then made the change to the copy and gave it the name of the original table ("basicdata"). This table is filled by entries in a form that also has several subforms that create records in linked tables.

Data entered into the main entry form are correctly inserted in the new table ("basicdata"). Data entered in the SUBforms, however, now cause an error stating that the data cannot be saved because no corresponding record exists in "basicdata--orig" (the table that was replaced). Apparently, the main form retained the linkage to the table NAME "basicdata", but the subforms somehow followed the original table's NAME CHANGE and are now looking to it for the corresponding records. Of course, the records are not there.

1) I'd like to understand just what went on here and 2) I cannot find any refence to "basicdata--orig" in the properties of the subforms so I don't know what to change to correct the problem. I realize I could correct it by switching the table names back again, but that action would necessitate some reentry of data that I'd like to avoid.

I know this is probably as clear as mud, but if anyone has followed it and has some answers, I'd sure appreciate hearing them. Thanks!

View 2 Replies View Related

Forms :: Change Recordsource On A Subform

Mar 13, 2014

I know this is probably already in the forum but it is getting pretty big and I can't find the answer. I have this:

frmMain frmMainSub frmMainSubSub recordsource = query1

How do I change query1 to query2?

View 2 Replies View Related

Subform Records Change Sort Order

May 8, 2005

I have a subform embedded in a mainform which contains loan payment details over a number of months. The record starts with the payment period number ie 1,2,3 etc. The problem is that every now and again the subform changes the display order of the records so that I get 4,5,6,1,2,3.

When I look at the underlying table the order is OK as is the non embedded sub form. I cannot see any reason for the change and it only happens randomly (apparently).

The numbers are not autonumbering but manually input.
Hope someone can help please.

View 1 Replies View Related

Change Subform Based On Form Selection

Jul 2, 2005

Greetings! This forum has been most helpful to a rusty Access user.

I'm creating a student group score entry form, having problems with creating the form I want. Say for example we have the following:
1. Three groups: A,B, and C.
2. Group A has 5 students, Group B has 3, and Group C has 20.

I want a form where I can select group A, and a list of the students will populate and enable me to enter scores for all of them on the same page. This will save time not having to re-enter the information for so many students. If anyone has a clue of what I'm talking about or is willing to lend me aid, I would appreciate it.

Cheers.

View 4 Replies View Related

Change An Entire SubForm Within A Tab Based On Combo

Aug 24, 2004

I have a Form with some combo box's in header and a TabControl with 5 tabs in Body.

In each Tab I have a subform. All is working as should.. each form is requerying perfectly based on user combo choices.

What I would now like to do is swap one subform in one tab for another subform, depending on what choice is made in combo box.

That is...

Combo choice 1 ... requires Subform's 1, 2, 3, 4, & 5 in Tab's 1, 2, 3, 4 & 5 ..
Combo choice 2 though... requires Subforms's 1, 2, 6, 7, & 8 in same Tabs. .. Tab's are umbrella's for multitude of subform possibilities.

I really need some guidence here. Thanks.

View 4 Replies View Related

Using One Field To Change Another's Format In A Continuous Subform

Mar 7, 2006

I'm working on a purchasing database where if the user checks a box on a subform, another field needs to be disabled. The code works, but since this is a continuous subform, it disables that field on every row. Is there any way to make it stick to the row the user is working on?

Here's the code:

If Me!acs_puchase = -1 Then
Me!inventory_po.Enabled = False
ElseIf Me!acs_puchase = 0 Then
Me!inventory_po.Enabled = True
End If

Thank you!

View 8 Replies View Related

Forms :: Change Subform Default View

Apr 25, 2014

I have a mainform with a listbox and a subform sitting in the mainform. The default view of mainform is single. The listbox displays a list of people. When the user clicks on a row of the listbox the subform shows detailed data about that person. The layout of the subform covers almost half of the area of the mainform. It works except that the subform automatically takes table view as if there were many records to display although it displays only the selected record. This automatic manipulation of the default view does not look good at all.

View 12 Replies View Related

Forms :: Change A Subform To A Popup Form

Sep 24, 2013

I had a subform to enter payments. It worked well. The master and child fields linked well and all the necessary data appended to a new record in the payments table.

Now to make it more user friendly, I changed the subform to a popup form (The 2 forms took up too much real estate on the screen).I deleted the payments subform and created a command button to open the payments form as a popup.

I need 3 fields on the payments form to be populated from the edit sponsor form (sponsorID, MemberID, SponsorTypeID) and then payment details to be entered and posted to a new record in the payments table.Since I've changed the payment form from a subform to a popup form, the master/child relationships are gone and the 3 fields I need for the payment record no longer appear.

View 1 Replies View Related

Refresh / Requery Subform Upon Combobox Change

Jun 17, 2013

I have been using AYS2000 database example from Rogers access library. I have been in the process of modifying to meet my needs. Although I have run into a problem that was prevalent in the original database example. I have attached the original database for your reference.

Problem: At the bottom of the database beside the "New Response" button there are 2 combo boxes that allow you to select the survey and response in which you want to view in the subform. Although when selecting the response the subform does not always update the record in the subform. It would appear that the problem occurs only after a response has been previously selected. I have tried adding additional code to refresh and requery the subform already without any success.

View 3 Replies View Related

Multiple Picture Change Subform Focus

Apr 22, 2015

Is it possible for an image control to change to a different picture on a form when focus changes to a different record on a subform? I am developing a simple database to record my ever growing collection of TV shows. The form that I use to view my TV show records has an image control on it, I previously had a single image for the entire series (box art for first season). I now want that image control to change to a different picture when the focus changes to a different record on the subform. i.e. when the focus changes from the first season on the subform to the second season; the picture on the main form changes with it.

View 7 Replies View Related

Forms :: Change A Field For All Records In Filtered Subform

Aug 3, 2015

I am currently developing a crude Contact manager database and need a quick way of entering data into a selection of records (around 1000 at a time). At the moment I am manually going through all records and changing the "DateLastEmail" field manually, which can be very tiring.

Any way to assign a button to change the field for all records to today's date or something of the like.

Currently I have a form which filters my subform. The subform resides as a seperate query and when the "Apply Filter" button is pressed it requeries with a change of .filter property, so I guess that all that needs to be done is to change all records that exist within the query, but I am stuck on a way to do this without manually entering it.

View 3 Replies View Related

Modules & VBA :: Update Subform To Unbound Textbox Value Change

Aug 4, 2015

As the unbound parent list box record selection is changed, I want the sub form to refresh. Do I put code in the Subform Current Record event?

Master Form Name: frmsr_NewWellEntry
Unbound Listbox - when record selected the primary key populates txtNavWellID (unbound) on parent form

subform Container fsubsrNavSHLBHL Link Master Fields =Forms![frmsr_NewWellEntry].[txtNavWellID]

The read-only form in the subform Record Source is something like: select * from vsrNavigatorSHLBHL where Well_ID =90243..Key The Form used as the subform above will be re-used in multiple parent forms. The parent form data is form SQL Server, the subform from Oracle.

View 4 Replies View Related

Modules & VBA :: Change Default View Property Of Subform

Feb 26, 2014

I have a form with a subform where I want to select (via button) which format to open the form in. Opening the form is simple, DoCmd.OpenForm (FormName),acFormDS to open in datasheet, however, the subform opens in default view (single form). Can you programmatically set the property on the subform to change the Default View from Single Form to Datasheet and back?

View 3 Replies View Related

Forms :: Search Field - Subform Does Not Change To Show Matching Records

May 6, 2013

All. using 2010. I have a form and a subform. my master and child links are set but when I scroll thru my form; my subform does not change to show the matching records. I do have an unbound search field for the same field as the master and child links. When I type in the search field for a record; the subform does change to that particular record. Do you think that has anything to do with it?

View 1 Replies View Related

Forms :: Refresh Pivot Chart In Subform After Changing The SQL Of The Subform's Query?

Sep 16, 2014

I have a form, a couple of comboboxes and text boxes on it. When these are filled out, the SQL of a query is changed using these parameters.

There are three subforms on the form, all pivot charts, all based on the query being changed.

The goal would be to update all three according to the user-given parameters.

Right now the subforms only update if I close and open the form, which is probably not the best solution, since it's too slow.

I've also tried to requery and refresh them, with no result.

Then I tried to overwrite the recordsource of the subforms with the same text that was originally there. This got them to refresh their data, but then all of the charts disappeared and had to be built again, so this is a no go too.

View 7 Replies View Related

Change Query

Jun 21, 2005

I am creating a database that is going to import excel files once a week. Most of the data will be the same every week, but some may change slightly or new records may be added. I need to create a query that will show all the changed/new records that are imported from the excel file. i would prefer to use as little code as possible if at all. I am pretty much a novice when it comes to queries so any suggestions would be appreciated.

View 1 Replies View Related

How To Change Row In Query

Jul 20, 2007

Hi
How is it possible to change row in query column title?

I have query which look like this:
[number] [start time] [end time]
1224345 12.6.2007 13.6.2007

I want that my query should look like this:
[number] [start [end
time] time]
1224345 12.6.2007 13.6.2007

View 2 Replies View Related

Change Value From One Query To Another.

Mar 20, 2005

I'm a beginner Access user and would love some advice.
I have two queries:
1. A query called: Scores
This query tallys the information (in numbers) gathered from different fields from a table in a raw score.

2. A query called: Results
This query should then convert the raw score from a field in the query Scores and display a sten score (1-10) in the query Results depending on some pre defined values. For example: A raw score of 1-21 should return the sten value 1. From 22-38 should return the value 2 and so on and so forth.

Somebody remarked that I should use Select Case to do this, but I cannot find an example of how to use that that is easily
tranferable to my circumstances.
Thanks!

View 1 Replies View Related

Forms :: Change Button Color After Data Change

Apr 5, 2014

I am trying to change the button color on a subform if a related form data changes.Main form is products with a continuous subform with serial numbers of products i.e, serial number, location, price and a button to add addtional issues if there are any for this particular serial number (this will open up another form related to the serial number so I can add an issues if there are any).The reason I would like the button to be a different color is so I can quickly see if there are any additional notes been added to the serial number. Just in case you may ask why not add the field to the continuos form is that the issues and be quite lengthy and there may be lots of serial numbers on the form

2346 location warehouse price 29.99 (button - green)
2347 location shop price 29.99 (button - red)

View 1 Replies View Related

How To Change The Criteria Of A Query From The VBA?

Aug 9, 2005

I have a database consisting of one table with 5 columns, called Name, Zip Code, Model, Serial #, and Reference #

I made a form with 5 text boxes (generically named Field 1 through 5), and then I built a query. I put all five of the table's fields in the query. In the criteria fields of those five columns, I have

Criteria: Like "*" & [Forms]![Search_form]![Field1] & "*"
Criteria: Like "*" & [Forms]![Search_form]![Field2] & "*"
Criteria: Like "*" & [Forms]![Search_form]![Field3] & "*"
Criteria: Like "*" & [Forms]![Search_form]![Field4] & "*"
Criteria: Like "*" & [Forms]![Search_form]![Field5] & "*"

However, here in lies the problem:
Some of the records don't have a reference field included, and others don't have serial numbers, and etc. Basically, some records have blank fields.

So to find all of "John"s records, we would put John in Field1, and then run the query.

The first criteria is now looking for *John*, which is correct (it might find Jack John, Johnny, John John, or anything else with j o h n in it).

The rest of the criteria are now looking for **.

However, what about the records with blank fields?

John ; _____ ; SDMS71 ; 1231234 ; REF9001 will NOT make it into the query, because that blank field for some reason doesn't meet the ** wildcard!

how can I accomodate this "blank field" problem? I want those records with blank fields to still be included in the query, because they still belong to "John", and that's what i wanted to search for! :(

View 8 Replies View Related

Change Query Criteria Value?

Jan 18, 2006

I have a database with 20 queries designed specifically for my department (SAM). A friend would like to use my database i.e. queries, reports, etc., but her department is named different (PAM).

The the field names in the each of our imported 'data' is the same, EXCEPT, each record in her department data field has "PAM" mine "SAM". However, her department is not part of my data import nor mine of hers nor will they ever be.

How can I, except manually, change every instance of "SAM" to "PAM" in the 20 queries?

Thanks
Gunner...:confused:

View 2 Replies View Related

Trying To Get A Query To Change Text

Mar 26, 2007

I have a report based on a query

and it hase a [Product] and a [Quantity] field

Quantity Product
80 F2 1.25" Fiberglass Sucker Rod
60 F2 1" Fiberglass Sucker Rod
80 1" coupling
60 7/8" coupling

what i am trying to do is multiply the quantity by 37.5 if [Product] equals one of the items that are sold by the foot and leave the other items the same

this is the way it needs to display on the report

Quantity Product_Name
80 (3000') F2 1.25 Fiberglass Sucker Rod
60 (2250') F2 1 Fiberglass Sucker Rod
80 1" coupling
60 7/8" coupling

thanks for any help

View 3 Replies View Related

Change Check Box Value Query

Jul 18, 2007

Hello,

I have a form that has a check box on it. I have a query that calls all records where the check box is checked.

Once I peform my required action using the query I want to change all of the check boxes back to "Not Checked"

Is this possible? Currently I open the query and manually uncheck them.

Thanks!

View 4 Replies View Related







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