DESPERATE:cannot Refer To Subform Control

Nov 14, 2006

Still beating my head on the wall. I'm sure it is simple but I NEED guidance.

I've made a macro to show a date field when the "Yes" option button is selected and hide it when the "No" option button is selected. I first created it for the form to act on its own --> and it works. Now I want to use that form as a subform in the form [frmTestPkg]. I am having problems figuring out how to reference it properly as a subform.

Here's my macro that works when I attach it directly to my form:


Condition:[Forms]![frmsubcruiseplan]![CrPlRecvdNo].[OnGotFocus]
Action: SetValue
Item: [Forms]![frmsubcruiseplan]![CrPlSubmDate].[Visible]
Expression:No
Location: "On Got Focus" Event for the option button "No"

Condition:[Forms]![frmsubcruiseplan]![CrPlRecvdNo].[OnGotFocus]
Action: SetValue
Item: [Forms]![frmsubcruiseplan]![CrPlSubmDate].[Visible]
Expression:Yes
Location: "On Got Focus" Event for the option button "yes"

I have followed the pattern provided previously of

Forms![main form name]![subform control name].Form![control name]

but cannot get it to work -- obviously messing up somehow.

The reference I tried in the condition looks like this

[Forms]![frmTestPkg]![frmsubcruiseplan].[Form]![crplanrecvdNo].[OnGotFocus]

--> and with or without the setvalue information included I get a "The object you referred to as an OLE object isn't an OLE object" error.

Perhaps I am not identifying the subform control name properly? Or maybe I should be referring to the "Cruise Plan Recvd Option" instead of the individual control boxes (but it worked as a form)? Please spell it out for an idiot, what this is supposed to look like. Many thanks!

View Replies


ADVERTISEMENT

How Rewrite Queryfilter To Refer To A Control In A Subform?

Aug 16, 2006

Hi!

I've developed a form to be standalone. It's based on a query with filter like this:

Like "*" & [Forms]![myForm]![Fltr1]

(The Fltr1 is a combox value.)

Now when i place the form "myForm" as a subform in another form (FormMain), the query does not give me any data.

How do i refer to the filter from the query??

Any help will be much appreciated!

thanks ;)

View 2 Replies View Related

How To Refer To Parent From Subform's Control Row Source

Oct 10, 2006

I have a main form with a subform. On a subform I created a combobox which I want to populate with ClassIDs that match the main forms Individual. I know the criteria in VBA for the above would look something like this:

"SELECT tblClassesAttended.ClassID FROM tblClassesAttended WHERE blClassesAttended.IndividualID=" & Me.Parent!IndividualID

but when I type such statement in the row source of the control it does not work. What is the correct way of refering to the parent form when typing the SQL in the row source?
BTW. I cannot use the main form's name

View 3 Replies View Related

Forms :: How To Refer To A Control From Subform To Main Form

Feb 5, 2015

I have Main Form is named MainFrm and it has

two Sub Forms :
- OrdersSubFrm
- DetSubFrm

I want :

if OrdersSubFrm is not contains any records DetSubFrm is not enabled

View 7 Replies View Related

Forms :: Syntax To Refer To A Control On Nested Subform In Access 2013

Mar 20, 2014

I have searched to find the correct syntax to refer to a combo box control on a nested subform. All the examples I've found Access 2013 will not recognize or find the appropriate control.

I have a parent form called IncidentDetails. On that form I have a control called ctrlLogDetail. Within that control is a form called sfrm_LogDetail. On sfrm_LogDetail, I have a control called ctrlType which houses a form called sfrmType. On sfrmType, I have a combo box called cboType. I need to be able to place the cboType choice into a query to filter records for another combo box on that same form. the query works appropriately when I have sfrmType open, however as soon as I try to call the query from the IncidentDetails form, Access cannot find the cboType control.

I've tried multiple variations of the syntax to call to cboType that I've found online. I found a very useful reference from BTA Development: however the syntax there will NOT work in Access 2013.

What is the appropriate syntax would be to get to my control within my 3 deep nested subform? I'm working Access 2013 and won't have a choice regarding Access versions.

View 5 Replies View Related

Reports :: How To Refer To A Control On Subreport

Feb 12, 2014

I have a report with several subreports. I need to total the subreports onto the main report. How do I refer to the control on the subreport?I know that with a form / subform I would use: Me!Subform1.Form!Controlname.But simply replacing 'Form' with 'Report' doesn't seem to work.

View 1 Replies View Related

Using A String Concatenation To Refer To A Control Name?

Feb 28, 2015

know if there is a way to use a string concatenation to refer to a control name. eg. Referring to Control1, Control2, Control3, Control4, etc using something like Me.["Control" & "1"], Me.["Control" & "2"], etc

View 6 Replies View Related

Forms :: Refer To A Calculated Value In Unbound Control In A Form

Jul 19, 2015

In my DB i would like to make a form that displays different calculated values based on other forms and queries like income running cost etc., but i do not know how to refer in an unbound control to value of a control in another form. I get always #names? error. However it worked when loaded that form i refered to. Is there a way to do it without loading the refered form?

View 3 Replies View Related

Refer To Subform

Apr 29, 2005

I have a Main form with two subforms Sub1 and Sub2.

I want to set the RecordSource of Sub2 from the OnGotfocus event on Control1 on Sub1.

My code is:

Dim intCtrl as integer
Dim strSQL as string

intCtrl = Me.Control1
strSQL = "Select * from MyTable where Id = " & intCtrl
Forms!Main!Form!Sub2.RecordSource = strSQL
Forms!Main!Form!Sub2.RecordSource.ReQuery

When Control1 gets the focus I get an error Runtime error 2465 Access can't find the field 'Form' referred in your expression.

Have tried many permutations but no luck.

Grateful for help.

View 1 Replies View Related

How To Refer To A Subform Properly...

Oct 11, 2005

Hey everyone

This issue is holding me back now on 2 areas of my project :(

I need to know correctly how to reference a subform in a query.

Can someone please give me a working example for this:


main form: training courses
sub form control: course_dates subform control
sub form: course_dates subform
text box: course_date


I have tried:

[forms]![training courses]![course_dates subform control]![course_dates subform]![course date]

in the criteria box, but every time the query runs i get a parameter box "forms!training courses!course_dates subform control!course_dates subform!course date" asking for the info.

Seriously I am totally stuck on this and i think all i need is one perfect example... please help!!!

View 3 Replies View Related

How Do I Refer To Subform In Conditional Macro

Nov 2, 2006

I have a form named frmtestpkg which has a subform named pkgsubform. The control the subform is in is called pkgsubform1. I have written a macro which works very nicely to hide or show the field [Days2process] if I attach it to "on current" on pkgsubform and open pkgsubform as a form. If I try to open pkgsubform as a subform I get a message stating "The object you referenced in the Visual Basic procedure as an ole object isn't an ole object."

How do I change my macro to refer to the form and controls as a subform?

my Macro looks like this:

condition: [Forms]![Pkgsubform].[CrPkgStatus]<>"Accepted"
Action: SetValue
Item: [Forms]![pkgsubform]![Days2Process].[visible]
Expression: No

condition: [Forms]![Pkgsubform].[CrPkgStatus]="Accepted"
Action: SetValue
Item: [Forms]![pkgsubform]![Days2Process].[visible]
Expression: Yes

View 2 Replies View Related

Forms :: Refer To Detail Section Of A Subform From Another Pop-up

Jun 29, 2014

I have a 'master' navigation form called 'NPYWC'

On it, there is a subform called 'patient' - this has a number of subforms in the detail section (Linked on a one-to-one key).

When the patient form loads, I hide the detail section until a user either

A. Finds an existing client record or
B. Clicks the 'ADD NEW' button

The ADD NEW button opens a separate (pop up) form where the primary patient information is gathered. When the user clicks "Save" on the pop up, my VBA script ...

A. Creates all the one-to-one relationships that are required.
B. Updates the 'Find Patient' field to the newly created patient number
C. Finds the new record
D. Un-hides the detail section (This is what I cant get to work)

I have tried a number of things. The latest being

Forms![NPYWC]![NavigationSubform].Form![Section].[Detail].Visible = True

The rationale for hiding the detail section in the first place? The answer is twofold.

1. If the user simply creates an new patient, the three actions (A, B C above) don't always run/display the data properly. (Im not sure why? ) The pop up form seems to be a good working solution for me.
2. My users have a tendency to change data on the default patient. I have tried going to new record, but then they add new (often duplicate) patient records.

View 3 Replies View Related

Forms :: Refer To Combobox On Subform Within Navigation Form In Query Parameters

Jun 6, 2013

There is a command button on my form that calls a filtered query. I'm filtering the query based on a combo box within the form using

[Forms]![frmAssignDwgs]![Combo15]

It works beautifully until I put the form as a subform in the Navigation Form I'm using. When I execute it from within the Navigation form, it errors out looking for [Forms]![frmAssignDwgs]![Combo15].

Is there another syntax I can use so this will still work from within the Navigation Form? Or another way to approach this functionality?

frmNavigation is the main navigation form
frmAssignDwgToPkgs is the subform that holds Combo15

I found another thread (which I can't link to since I'm new) and tried various arrangements of the following to no avail.

[Forms]![frmNavigation]![NavigationSubform] .[Forms]![frmAssignDwgToPkgs]![Combo15]

View 3 Replies View Related

Reference A Control On A Subform In A Tab Control!

Aug 3, 2006

OK. I have searched and searched and every thread dances around similar situations but none seem to address this particular one. I am trying to make a control on a sub form visible/not visible depending on the condition of a control on a main form. The catch is that the control I'm trying to change the state of is on a subform located in a tab control. I've tried a thousand combinations and none seem to work. How do I reference the control on the subform in a tab control?

Main Form: frmMemberMain
Tab Control: TabCtl12
Tab Control Page: 2
Subform: frmChildren
Control on subform: txtRelationship

Can someone please help before my brain explodes!! Thanks! :eek:

View 5 Replies View Related

Forms :: Referencing A Subform Control From Another Subform

May 27, 2014

On a main form i have a continuous subform listing Jobs.

On the Click Event i want to display the personnel and equipment separately in two additional subforms linked to the Job i have clicked on by JobID.

I have tried all sorts of references and currently have this:-

Forms!PersonnelAndEquipmentMovementFrm.PerEquipMov Jobs.JobID = Form!EmployeeSubform.JobID.Text

Which does not work?

View 4 Replies View Related

Desperate For Help

Jul 6, 2005

I have uploaded a database that I am working on it, and would appreciate it if someone could look at it and help me out, as I have gone through the forum trying to resolve my issue. There has been some topics on combo boxes and subforms and some of the posts only help me partly to my requirement.

When a user hits the button 'Enter Rate for Supplier' (which is to be double clicked, all buttons on the forms are double clicked) on the form 'Main form' a form 'Rates' comes up with a combo box and a subform. What I want then to happen is that a user selects a 'supplier' in the combo box, and then goes to the subform and selects the class and enters the rate. Note, the supplier names appearing in the combo box are entered through the form 'Enter Supplier Details' which is launched after the button 'Enter Supplier Details' on the main form is double clicked. Details entered through this form populates the table 'Supplier Details'. After entering the class and rate for that supplier in the subform the table 'Rates' is populated.

What I want to see is that after when they save and close the form, they can go back to the 'Enter Rate for Supplier' form select the supplier from the combo box and all the information that was entered previously in the subform for that supplier appears in the subform again. Then the user can produce more records by select more classes and enter rates.

So based on what I have stated above can someone please help me in making this happen. If you can also summarize how you did it, when you reply I would really appreciate it, in where your explanation could also benefit others like myself who is only an immediate. Also by all means you may keep the solution in the database for self education purposes.

Thanks so much for your help
Greg

View 2 Replies View Related

Desperate In Need Of Help

Oct 30, 2006

I need some help on a problem that has been bugging me for the past 4 months, everywhere i turn i cannot get help for this.
I have a DB for stores maintainance and what i have is a form on which stores are ordered. What i need is a way of accounting for the stores as they arrive and adding the quantity to the account for that item. However this must take into account that items sometimes are not received together and may turn up in batches. I had the idea of having an 'On-Order' table but don't really know how to proceed. This is the last piece of my project that i need to complete and it is really bugging me. Any help would be greatly recieved.

Regards in advance.

View 10 Replies View Related

Desperate !!!

Nov 24, 2006

Hi guys
This is a good one, so any help is most welcome . . .
A hardware company has been to a client and installed a new server.
On the old server was an Access database including a number of linked databases. Each linked database has a set of mail merge letters set up initiated via buttons and run with the help of vb code.
When the new server was installed all files were copied over as they were on the old machine, the linked databases all work as expected, but the mail merge facility is NOT populating the letters with the data from the database.

Would anybody out there have any ideas why this may happen ?
I am assured by the hardware company that the only difference between the old and new setup is the name of the server. All folders and files have been copied across as they were originally.

Thanks
ajm

View 1 Replies View Related

Desperate Need For Some Help

Jul 7, 2005

Hi All,

I have uploaded a database that I am working on it, and would appreciate it if someone could look at it and help me out, as I have gone through the forum trying to resolve my issue. There has been some topics on combo boxes and subforms and some of the posts only help me partly to my requirement.

When a user hits the button 'Enter Rate for Supplier' (which is to be double clicked, all buttons on the forms are double clicked) on the form 'Main form' a form 'Rates' comes up with a combo box and a subform. What I want then to happen is that a user selects a 'supplier' in the combo box, and then goes to the subform and selects the class and enters the rate. Note, the supplier names appearing in the combo box are entered through the form 'Enter Supplier Details' which is launched after the button 'Enter Supplier Details' on the main form is double clicked. Details entered through this form populates the table 'Supplier Details'. After entering the class and rate for that supplier in the subform the table 'Rates' is populated.

What I want to see is that after when they save and close the form, they can go back to the 'Enter Rate for Supplier' form select the supplier from the combo box and all the information that was entered previously in the subform for that supplier appears in the subform again. Then the user can produce more records by select more classes and enter rates.

So based on what I have stated above can someone please help me in making this happen. If you can also summarize how you did it, when you reply I would really appreciate it, in where your explanation could also benefit others like myself who is only an immediate. Also by all means you may keep the solution in the database for self education purposes.

Thanks so much for your help
Greg

View 1 Replies View Related

Desperate Please Help

Oct 30, 2006

I need some help on a problem that has been bugging me for the past 4 months, everywhere i turn i cannot get help for this.
I have a DB for stores maintainance and what i have is a form on which stores are ordered. What i need is a way of accounting for the stores as they arrive and adding the quantity to the account for that item. However this must take into account that items sometimes are not received together and may turn up in batches. I had the idea of having an 'On-Order' table but don't really know how to proceed. This is the last piece of my project that i need to complete and it is really bugging me. Any help would be greatly recieved.

Regards in advance.

View 4 Replies View Related

Desperate For Help- 2 Problems

Aug 30, 2007

Hey guys-
I am building a database for my own use- I download info from the Realtor MLS system and then run queries against it. I don't have control over user inputs whatsoever. I download the data into a DBF file- but can save it as an excel or whatever as well. I then am importing THAT data file into Access 2002. I have run into 2 problems right off the bat...

1- the Field names in the data file I am importing are very difficult to understand. There's nearly 100+ field names, so it could get confusing when I'm programming/creating queries. I'd like to change the field names upon import- or- have some way to match the confusing field names in the data file to the easier field names in the table. What's the best way to go about doing this? I tried using Captions- but they dont display the name of the field when using queries. Is there a field matching wizard upon import (maybe a set template for this) or something?

2- One of the fields I will be using to query a lot is the subdivision name. Since the users type this in, I have no way to control what they type. Sometimes they type in 'Willows', sometimes it's 'The Willows', 'Willows Unit 2', etc. Basically, I need them to be restricted into a common subdivision name upon import. I am guessing I would have a table with the 'acceptable names' in the list- and upon importing, take the ones that do not match and ask me to match them up manually. -OR- have a way to where it keeps track of every mispelled or variation of the name in a list so that it accepts/matches is up in the future without problems. Occasionally there may be a NEW subdivision name, so I would need to add it to the subdivision table. I think this is going to be the hardest part. I assume I am going to use the LIKE statement- but have no clue where to start with this. There are literally THOUSANDS of records going into this- so it needs to be able to recognize them all. Obviously I'd like to cut down on the manual overriding aspects as much as possible.

I think I can handle the rest of it, once I get past this (it's just forms and queries thereafter). But it's these 2 things I'm stuck on. Any ideas?
THANKS!

View 4 Replies View Related

Desperate Autofill Help

Jul 21, 2006

Ok here goes

I need some help with getting my form(form 2) to autofill from another form(form 1).

Now i dont want to use combo boxes or command buttons as i only want to use the keyboard and not the mouse.

Basically when a customer phones up to get prices they tell me there account code( this is in the customer details table) and i enter it into a text box on form 1 and after pressing enter it opens up form 2(this bit i can do) but i cant get it to open the form and display the correct details from the table on the form.

p.s why is it access books tell you everything except what you want to know.

thanks.

View 2 Replies View Related

DESPERATE For Someone Who Has AccessFIX

Jul 29, 2006

What an idiot I managed to delete a table in my access database!!!
Its a Junior Tennis Club database with all the childrens details I have downloaded and tried AccessFIX and Advanced Access recovery - Both these pices of software demos show me that the records are recoverable . Is there anyone out there who has either piece of software and would be willing to help - We'd gladly pay but to buy the software is out of our reach as a charitable organisation.

Kindest Regards Helen Oliver

View 1 Replies View Related

Desperate - Text Box Won't Let Me Type In It

Nov 14, 2006

I've got a label called Agent Matches. The box by it to type stuff in won't let me do that. I checked and it is a text box. My boss is after me, so please help someone! Appreciate it.

Jilly

View 4 Replies View Related

Desperate - With Correct Attachment

Nov 14, 2006

Sorry...attached the wrong file. Here it is again.

View 4 Replies View Related

Please Help: Password Locked VBA Code! I'm Desperate...

Oct 6, 2005

Hi,

I really hope somebody can help me... I put a password on the VBA code in an Access 2000 database. It's been a long time ago and now I have forgotten the password. I need to modify something urgent in that code, but it is locked now. I don't know the password anymore.

Is there some way to gain access to the VBA code again???
Please if you know a solution I would be very thankful!

:(

View 2 Replies View Related







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