Changing Visibilty Of Subform

Feb 8, 2005

I have a Cmd button set to

=[TblAddress Subform].Visible=Yes

in the event of onclick - and my subform properties are set to visible = no.

However this does not have the desired effect - rather than make the subform appear - it does nothing.

I'm guessing there may be an error in the exression syntax, but I don't recieve any error messages.

Can anyone spot the error?

Many Thanks,

Andy.

P.S. how can I put two commands into one expression, how do I seperate the two orders?

View Replies


ADVERTISEMENT

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

Changing A Control In A Subform

Nov 16, 2007

I have a subform on my main order form. I would like to click a button on my main order form and have it change a control on the subform. For instance, I have 2 controls on my subform, control 1 is a text field, and control 2 is a yes/no box.

When i click the button on my main for order form, I would like it to evaluate control 1 on my subform so that it can adjust control 2.

I would like to see if control 1 is null then set control 2 to yes or true. Thank you in advance for all your help.

View 4 Replies View Related

Changing Subform Size

Jul 26, 2005

A quick design question here,

Is there any code that you can add so that you have your main form open to maximise and your subform adjusts accordingly ?

My database is used by a number of users, some use 1024x768 and some use 1280x1024. I want the main form to maximise when loaded but I would also like to get the subform to adjust its size accordingly (avoid a thicker border around the edge of the main form)

Alternativey, is there a way to get the DB to detect what the screen settings are and have an IF statement when loading the form ?

Many thanks

MattP

View 2 Replies View Related

Changing JPEG In Subform

Jun 1, 2005

I am working on a database with two main tables: One table that is linked in from another database, and another table contains addresses to the location of jpegs that correspond with the records in the linked table. (Every record does not have corresponding jpeg, only some of them do.) The way the forms are currently set up, there is a main form and a subform. The main form contains only a combo box where the user can choose a record. The subform shows the rest of the information pertaining to the record, including the jpeg. The problem is that all the other information changes when the user chooses a different record - except for the jpeg, it stays the same. The code to pull the jpeg into the form works when under the form load procedure, but the jpegs do not change when a different record is selected from the combo box on the form. I tried to do this a straight forward way, and then I tried using the RaiseEvent command, but nothing seems to work. I have a relationship b/t the 2 connecting fields, and I have tried all 3 join types. Any help would be greatly appreciated.

View 2 Replies View Related

Changing Record Source On Subform

Mar 25, 2005

Hello, I have a form with a subform. I want to change the record source on the subform during an OnClick event. I am not sure what I'm doing wrong, but I get a "object does not support this method" error. Can anyone help? Thanks in advance.

View 1 Replies View Related

Changing Subform RecordSource Will Not Stick

Apr 18, 2005

Weird yet aggravating problem.

I am trying to setup a routine that will allow the user to change the RecordSource of a subform. The RecordSource is being changed yet once I move to another record the subform is reverting back to the original subform RecordSource. I am using the below command to change the subforms RecordSource...

Me.MySubformName.Form.RecordSource = MySQL
I even to make a copy of the subform and I changed the table it is linked to yet I got the same result

Me.MySubformName.SourceObject = "MyOtherSubForm"

There are no functions in the record selectors that would interfere with the subforms RecordSource.

Any suggestions as to why the RecordSource of my subform will not "stick" when I move to another record?

Thanks in advance for your help!

View 8 Replies View Related

Changing Subform's Recordsource With OnCurrent

Jun 29, 2005

Hi

I have problems working with a 3 level form

I have one main form called Projects

Depending on the record on the form Projects, the subform called Products will display the correct info

And on the OnCurrent event of the form Products, it will display the correct info for another subform called Product_Info

The problem is, the subform called Product_Info is dependant on a field on the Projects form, and on a field on the Products form so I cannot directly link the Product_Info form with either the Projects of Products form

What I'm doing is changing the recordsource of the Product_Info subform on the OnCurrent event of the Products subform but for some reason it won't work

If I display the recordsource of the Product_Info subform, it displays the right recordsource triggered on the OnCurrent event of the Products subform, but the data doesn't display

Thanks

View 3 Replies View Related

Changing The Subform/query On A Form

Jan 13, 2005

Hi,

I have a form that has a query on it. It acts as a subform. I would like for this query to be able to switch depending on what employee I've got selected on the form. I've tried playing around with the sourceobject property:

Dim name As Variant

name = Forms![Time Input Form]!Employee
Forms![Time Input Form]!Table.SourceObject = name


, but it keeps telling me
"Run-time error '3011':
The Microsoft Jet database engine could not find the object
~sq_cTime Input Form~sq_cTable'. Make sure the object exists and that you spell its name and the path name correctly."

The names directing to the subform are absolutely correct though. I'm just not sure if this is the right property to use.

Anyone have any ideas? Thanks. =)

View 1 Replies View Related

Changing The Order Records Are Displayed In A Subform

Feb 27, 2006

Hi everyone. I need help on this one

I have a form with a subform. The subform is basically the sale history of the item on the main form (The main form shows a record and then the subform reports its history). This all works fantastic, except that on the subform, every time a new record is entered, it goes to the bottom of the previous one, so after a while, if I want to enter more history into the subform, I have to scroll down through all the older ones to get to the more recent ones.

How can I do it so that in the subform the most recent entry is always at the top and each time a new record is entered, the older ones move down one. This way the most recent records are always on display and older ones move down as they become less important. Likewise, the empty record used to enter data is also at the top!

Thanks!!

View 14 Replies View Related

Forms :: Changing The Record Source From Within A Subform

Nov 2, 2014

Can I change the Records Source of a subform from within that subform and do a requery to have a different set of records displayed'

I want to be able to refine the records displayed in the subform

View 8 Replies View Related

Changing Subform Source Object Causing Problems

Aug 30, 2005

I'm trying to change a database that consists of a sequence of subforms held individually within different tabs on a subform. There seems to be a bit too much going on, so I've decided to leave the subforms unbound, and set them when the appropriate tab is selected, and unset them when the tab is changed. For most of the subforms, this works fine...

However! There's always an exception!!!

On one of them, when I set the sourceobject, it automatically populates the linkchildfields and linkmasterfields properties with an inexplicably crazy number of fields, most of which aren't even on the forms in question. I've tried to get around this by setting linkchildfields and linkmasterfields after changing the sourceobject. This does not work!

The first thing that happens is it returns error 2335 (relating to an imbalance between the number of fields) when I set linkchildfields. I try to get around this by trapping and resuming to the next step so it sets linkmasterfields and restores the balance, but, despite the fact that the linkchildfields and linkmasterfields are showing the correct fields, the form acts as if it has been bound with the screwy list of fields, and starts asking for fieldnames which are on neither form as parameters. When I hit cancel the subform control is empty.

I'm at a loss as to what the problem is or how I should sort it out! Any suggestions gratefully received.

View 2 Replies View Related

Modules & VBA :: Changing Subform Visibility On The Basis Field Value

Dec 27, 2013

I have a form containing client demographics. One of the fields is the DateOfBirth. I would like to control the visibility of a subform based on this DateOfBirth field.

I have tried using the code below:

Private Sub Form_Current()
If DateOfBirth > 11 / 11 / 1994 Then subEligibility.Visible = False
End Sub

This works when the form is opened for the first record, but the visibility does not change as I scroll through the rest of the records.

View 4 Replies View Related

Forms :: Subform Datasheet With Changing Query Crashes

Aug 8, 2014

I have a table of events, tblActivitiesDates which have an activity type and a date.I have a form which has a datasheet with a query source (a separate datasheet form embedded in this one), and 2 radio buttons. The query that is used uses radio buttons this way:

-Activity Type Filter: A radio button, that when clicked a combo box appears, with a list of activity types to choose from. Basically, filtering by Activity Type.
-Date Type Filter: A radio button, that when clicked 2 text boxes appear, in which you write the dates between which you want to see the events organized in the table. Basically filtering by dates.

To make reading easier, Activity Type Filter=ATF, Data Type Filter=DTF.There are 4 possible options:

-ATF=ON and DTF=ON
-ATF=ON and DTF=OFF
-ATF=OFF and DTF=ON
-ATF=OFF and DTF=OFF.

For each option, I have written a line of code in the appropriate OnChange/AfterUpdate/Whatnot events in the form: CurrentDb. QueryDef ("qry ActivitiesDates"). SQL = "SELECT..."according to whatever option is currently active.

When I enter values into the form, and instead of embedding my datasheet form I simply open it every time from the navigation pane in a new window, the datasheet is filled appropriately and works 100%. Of course, I have to reopen it every time I change something so the query will rerun.After the table crashes (will be explained soon), I re-embed it to the form before trying it again. The first time I re-embed, no matter what I do, the query doesn't update nor crash.

Say I start with the option ATF=ON, DTF=OFF, it will work fine, updating when needed, but if I tick DTF=ON, regardless of the dates I enter, the table will only change according to the first option (While when open in a new window will show the correct table entries), ignoring the fact that the QueryDef. Sql has changed. Once I tick ATF=OFF, the table crashes and I get the error:"Run-time error'3420': Object invalid or no longer set".The exact same thing happens when I go DTF=ON,ATF=OFF. It ignores the event types I enter, and once I tick DTF=OFF, it crashes with the exact same error.

I added Me.Activities_DS.Form.Requery (datasheet's name is Activities_DS) in every place it should update.

View 8 Replies View Related

Changing Column Widths In Subform Bound To A Query Throws A Prompt

Aug 22, 2006

i have a subform on a form with Source Object="Query.myquery", my form is generating a sql string dynamically and assigning this sql string to the RecordSource property which works fine. But now if the user changes the width of the columns in the subform and close the form , a prompt is thrown asking if the "myquery" needs to be saved. I dont want to save the settings of "myquery" but at the same time avoid this modal dialog. If i use DoCmd.SetWarnings=False , i dont see the warning anymore BUT the query gets saved.

I am using "myquery" to just display column names in the subform when the forms loads and also without it i cant directly use RecordSource property in my code.

any suggestions?

View 1 Replies View Related

Forms :: Selecting Record In Parent Subform From Child Continuous Subform

Jan 26, 2014

I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)

The continuous form cannot be edited, it is to be a list for viewing the information only.

I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.

I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.

I tried the DoCmdSearch for record and just keep getting object is not open errors.

View 2 Replies View Related

Subform Blues - Data Entry Setting Itself To 'No' & Requerying 1 Subform From Another

Dec 5, 2006

2 Subform problems

I have a data entry subform that is only supposed to show an empty record ready to be populated, and a display records subform that is supposed to show all the records. The subforms are both on the same tab of a tab control on my main form.

Problem 1:
The data entry subform shows all the records rather than a blank record. Something on my main form is causing it to show the records when it should not. Any ideas? The Data Entry is set to Yes.

To try to isolate the problem, I created a new form and added the subform to it where it behaves properly:confused:

I then added Me.DataEntry = True to the form open to see if that would solve my problem but it still sets the data entry to no.

If I have the properties box open when in form view of my main form, I can set the data entry to Yes and it works fine until I move to the next record of the main form when it resets to no. Teraing my hair out here.:mad:

My final attempt was to search the entire project to see if there is a "DataEntry = False" somewhere but there isn't. What is setting this property? Any ideas where I should look?


Problem 2:

After entering data in the first subform (data entry form), I want to re-query the second subform but I just can't get the syntax right. I have wrestled with the "Syntax for subs" document downloaded from http://www.mvps.org/access/forms/frm0031.htm (Microsoft MVP site) but to no avail.

My main form is called fdlgPrjDetails, the data entry is via fsubPrjCommentsUsersDataEntry and the subform I wish to requery is fsubPrjCommentsUsers.

None of the attempts below worked giving a cannot find control error.


Private Sub Form_AfterUpdate()
On Error GoTo ErrHandler

Me.Requery

'Me!fsubPrjCommentsUsers.Requery
'Me!fsubPrjCommentsUsers.Form.RecordSource.Requery
'DoCmd.Requery ([fsubPrjCommentsUsers])
'DoCmd.Requery [fsubPrjCommentsUsers]

ExitHere:
Exit Sub

ErrHandler:
MsgBox Err.Number & " - " & Err.Description & Chr(13) _
& Chr(13) & "Error in fsubPrjCommentsUsersDataEntry: Err 003"
Resume ExitHere
End Sub


Any Ideas?

Both problems have me stumped so I'll be grateful to anybody with a scoobie on this.:)

View 10 Replies View Related

Forms :: Calculate Subtotal On Subform And Display On Upper Subform

Jun 20, 2013

im having problems getting a subform to calculate another subform's total and display it as it keeps coming up with the #NAME?.Basically my database is like this

tblCustomer
- tblOrders
- tblItems

and this is displayed on a form. so you can flick through clients, then flick through the orders and its broken down into the items inside each order.i have seen many answers that are only about calculating something on a subform and displaying on a form but this does not work when displaying on a 'parent' subform. the form structure looks like this

frmCustomers
- sFrmCustomerItems
- sFrmCustomerOrders

i have a calculated control textbox in the footer of sFrmCustomerOrders with sums up all the prices using =sum([Price])and in my sFrmCustomerItems, i have a field called Amount (the total amount of all the items) and the Control Source formula i was using was =[Forms]![sFrmCustomerOrders]![sFrmCustomerItems]![txtTotalPrice] but i get a #NAME? error.

View 5 Replies View Related

Changing Form?

Apr 20, 2006

I just recieved a call from a customer who is having trouble with a database that I did not create for her.

She says that she modified a form in design view and saved it. Now when the database is opened using he shift key, the changes show on the form in form view. She says if she opens the database normally (without the shift key) the changes do not show on the form.

This does not make sense to me. Can anyone give me a clue as to what might be going on?

View 5 Replies View Related

Changing Cursor

Nov 26, 2005

Is there any whay you can change the cursor as it moves over an object, similar to what it does with hyperlink.

I am trying to make the form more dynamic

Thanks

Dave

View 2 Replies View Related

Changing Times???

Jan 5, 2006

We use a device called a site master to test frequency levels across a system. This device stores plots onto graphs which are then downloaded onto an Access (95) database. When the plots are captured before they are put into the database they are time and date stamped among other things. When I open the Database in access I can go into the fields and physically change each of the dates. Yet when I use the site master software to open the database the Time and Date stamp appear at the bottom as the original values and not the changed values that I have assigned. Also when you right click the plots table and go to the properties. The created and modified dates have stayed as the originals. What I would like to be able to do is adjust this date. And what I would like to know is this possible??? Is it like a Windows File 'System' that is giving this date or is it a function in Access that can be changed?

View 4 Replies View Related

Changing Layout

Mar 16, 2006

Hello Everyone,

I'm pulling my hair off with this situation. I have an excel file that was given to us by the payroll department of our company, but my manager doesn't like the layout in which was given to us. I've attached a sample of the file, the file has two sheets the first one is how the original file looks like and the second sheet "final look" is how my manager want the file to look.The original file is pretty big, it's for 33 different employees and it contains 93,500 rows. I think it will take forever to do this manually, any ideas would be really appreciated.

Thanks,

Pablo

View 3 Replies View Related

Changing Icon For Mde!

Apr 24, 2006

hello guys,

firstly thanks to all the guys here without whose help, I would not have been able to finish my database. However, there remains one question to which I havent found a satisfactory answer. I have checked through all the threads here.

I have made an .mde for my application and I want to customize my application icon to my company icon. The DB by default shows the access icon which I would like to change.

The threads here deal with issues of changing the desktop shortcut icon or changing the icon for forms. These threads do not address the problem I am facing.

I want the icon to be changed from access icon to a customized icon.
I am using MS access 97.
Any help will be greatly appreciated. If there is a thread which I may have overlooked, plz point me out.
Thanks in advance
FXP.

View 5 Replies View Related

Changing A Password

Aug 1, 2007

I have set a password on my access document but now need to change it - does anyone know how to do this?

View 1 Replies View Related

Changing From One Mdb To Another One With A Hlep Of VB

Jan 9, 2008

I need a little help in the following topic:

There is an Access (2002) database used at our company covering its different tasks; different mdb files are used for different tasks (storage, invoicing etc.). All of them are linked to a central file that holds the tables.

Some of the users use more files; the same colleague uses for example the storage module and the service module.

I'd like to keep it this structured but I'd like to make it easier to change between the files so the user don't have to quit manually from the storage moduel and open a service module, giving his password for the tenth time per a day.

Could you help with an advice how I could do with VB that by clicking on a button the presently used file closes and another preprogrammed one opens.
(For closing I'm using DoCmd.Quit but no idea how to open something)

I really appreciate your help.

Peter

View 3 Replies View Related

Changing The Password

Apr 13, 2008

i am doing a computing project using access 2003 and vba.
i have designed 2 forms A and B, form A is where a user to logs in to my system (with four main items: username (combo box), password (textbox) and two buttons) and form B is where the user can change their password (with four items: username (username (combo box), new password (textbox) and password verify (textbox) and a button that checks everything and updates the password).
Form A has two buttons, one button can log the user into the system after typing in their correct username and password credentials, and the other button gives the option to change their password also after typing in their correct username and password credentials (and the opens up form B for the user to change their password)
My question is, when the user presses the button to open up form B, what code could i use (or methods in access) that would set the username field (in form B) the same as in form A automatically without the user having to select it again?
All help would be much appreciated

View 1 Replies View Related







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