Subform Control

Hi,

I have designed a database for members of our organisation with tables, 
queries, forms, subforms, graphs etc.  Our members are independent and we 
have no say over their IT systems and so i need the database to work on 
Access 2000, 2003, 2007.

I wrote the original in Access 2000 (lowest common denominator) and i am now 
testing it in 2007 and 2003 to get them to work. After a few issues, i now 
have it working fine in 2007 but have a really strange issue in 2003.

I have a main form (frmCompany) with a subform (frmStaff), they link 
together and show the right staff with the right company.

I then have other forms that have a query as their source, with a criteria 
on StaffID, to bring up on the data for that staff member, i.e. the criteria 
is [Forms]![frmCompany]![frmStaff]![StaffID] and then when the user presses a 
button on the subform, it opens another form just containing the data for the 
staffid selected.

This works fine in 2000 & 2007 but when i open it in 2003 the forms just 
come up blank as do the queries (ie the criteria isn't working) and there has 
been no change whatsoever from when i opened it in 2000 or 2007. 

I checked the help and it seems to say i am doing it right, also i remade 
the query just in case and it didn't help.

Please can some one help me out of this jam, i have wasted a whole day on it 
so far.

Thanks
0
Utf
7/26/2007 2:20:03 PM
access 16762 articles. 3 followers. Follow

2 Replies
715 Views

Similar Articles

[PageSpeed] 9

Hi Emma

Try using just

Forms![FormName]![ControlName] 
Filter the main form to give the criteria (staffID) and then link the 
subform (which you have already done)

This looks like you are trying to filter a subform - which will not work if 
it linked to the mainform with another staffID
[Forms]![frmCompany]![frmStaff]![StaffID]


-- 
Wayne
Manchester, England.



"Emma Hope" wrote:

> Hi,
> 
> I have designed a database for members of our organisation with tables, 
> queries, forms, subforms, graphs etc.  Our members are independent and we 
> have no say over their IT systems and so i need the database to work on 
> Access 2000, 2003, 2007.
> 
> I wrote the original in Access 2000 (lowest common denominator) and i am now 
> testing it in 2007 and 2003 to get them to work. After a few issues, i now 
> have it working fine in 2007 but have a really strange issue in 2003.
> 
> I have a main form (frmCompany) with a subform (frmStaff), they link 
> together and show the right staff with the right company.
> 
> I then have other forms that have a query as their source, with a criteria 
> on StaffID, to bring up on the data for that staff member, i.e. the criteria 
> is [Forms]![frmCompany]![frmStaff]![StaffID] and then when the user presses a 
> button on the subform, it opens another form just containing the data for the 
> staffid selected.
> 
> This works fine in 2000 & 2007 but when i open it in 2003 the forms just 
> come up blank as do the queries (ie the criteria isn't working) and there has 
> been no change whatsoever from when i opened it in 2000 or 2007. 
> 
> I checked the help and it seems to say i am doing it right, also i remade 
> the query just in case and it didn't help.
> 
> Please can some one help me out of this jam, i have wasted a whole day on it 
> so far.
> 
> Thanks
0
Utf
7/26/2007 3:22:11 PM
I knew it must be something simple as the help files agreed i was doing the 
right thing. I copied and pasted the form over itself & it worked, no idea 
why.

By the way, i was talking about filtering completely separate forms by the 
value of a control on my subform, not the subform itself.



"Wayne-I-M" wrote:

> Hi Emma
> 
> Try using just
> 
> Forms![FormName]![ControlName] 
> Filter the main form to give the criteria (staffID) and then link the 
> subform (which you have already done)
> 
> This looks like you are trying to filter a subform - which will not work if 
> it linked to the mainform with another staffID
> [Forms]![frmCompany]![frmStaff]![StaffID]
> 
> 
> -- 
> Wayne
> Manchester, England.
> 
> 
> 
> "Emma Hope" wrote:
> 
> > Hi,
> > 
> > I have designed a database for members of our organisation with tables, 
> > queries, forms, subforms, graphs etc.  Our members are independent and we 
> > have no say over their IT systems and so i need the database to work on 
> > Access 2000, 2003, 2007.
> > 
> > I wrote the original in Access 2000 (lowest common denominator) and i am now 
> > testing it in 2007 and 2003 to get them to work. After a few issues, i now 
> > have it working fine in 2007 but have a really strange issue in 2003.
> > 
> > I have a main form (frmCompany) with a subform (frmStaff), they link 
> > together and show the right staff with the right company.
> > 
> > I then have other forms that have a query as their source, with a criteria 
> > on StaffID, to bring up on the data for that staff member, i.e. the criteria 
> > is [Forms]![frmCompany]![frmStaff]![StaffID] and then when the user presses a 
> > button on the subform, it opens another form just containing the data for the 
> > staffid selected.
> > 
> > This works fine in 2000 & 2007 but when i open it in 2003 the forms just 
> > come up blank as do the queries (ie the criteria isn't working) and there has 
> > been no change whatsoever from when i opened it in 2000 or 2007. 
> > 
> > I checked the help and it seems to say i am doing it right, also i remade 
> > the query just in case and it didn't help.
> > 
> > Please can some one help me out of this jam, i have wasted a whole day on it 
> > so far.
> > 
> > Thanks
0
Utf
7/31/2007 12:34:02 PM
Reply:

Similar Artilces:

Enabling copy and paste in CComboBoxEx Edit Control
Hello, I have a CComboBoxEx created on a DialogBar. I want the Ctrl+Ins and Shift+Del keys to work for copy, paste and cut functions as one would expect them to, however they don't. I've followed the instructions outlined in Q174667 to subclass the edit control thinking I would be able to handle the WM_KEYDOWN message and enable copy, paste, etc... The subclass is successful but the derived CEdit class doesn't recieve any keyboard messages. What's the deep, dark secret to enable this simple functionality in the CComboBoxEx's edit control? It just seems like a simple t...

searching for rollup control
Hi I'm searching for free MFC control that looks and behaves like Windows Control Panel "Add/Remowe Programs" Applet. Thanks for any links or maybe some suggestions how to start writing my own control - which MFC class to derive from... thanks 1) You will have to create a CFormView derived SDI app. 2) The dialog resource corresponding to the View should have 4 buttons on it for each of the items:- a)Change Or Remove Programs b) Add New Programs ..... 3) You should then create CDialog objects at runtime and associate with dialog resources 4) When user clicks the buttons...

WM_CREATE not received in dialog's controls
Hello, I am trying to make a 3d visualization panel deriving th CButton class. For that, I need to initializa som stuff after the control (inside a dialog) has a valid HWND but before it paints itself for the first time. At first I done it programatically creating the control and placing the 3d-initialization code inside the WM_CREATE, and it worked right. But I want to create the control from a resource ID, not programatically, to avoid the need of positioning and sizing tasks. And there lays the problem: I use DDX_Control to associate the resource ID and the member variable for the ...

Date time picker control's format in resource editor
This problem relates to the resource editor in Visual Studio .NET 2002/2003 If you create a date time picker control in resource editor and set its format to “time”, save and close the resource editor, when you open the resource editor next time, the format of that date time picker control will always be reset to “short date”. In a word, it cannot keep the “time” format. Antbody know how to get around it Thanks! >This problem relates to the resource editor in Visual Studio .NET 2002/2003: > >If you create a date time picker control in resource editor and set its format to �time�, ...

control of external drive?
(XP Pro) I have Process Explorer, which tells me a lot about what is happening on the C: drive, but I find that external USB drives (MyBook 500gigs) are tending to hang, and I cannot see how to find out what programme is causing it. Any ideas how to tell what external drives are doing? Cheers, S Could it be your AV Software that is Scanning it upon detection? Russ -- Russell Grover - SBITS.Biz [SBS-MVP] Microsoft Gold Certified Partner Microsoft Certified Small Business Specialist 24hr SBS Remote Support - http://www.SBITS.Biz Second IT Opinion http://www.persona...

HLP ... VISIO Drawing Control --> Microsoft ?
As the Drawing Control was released long time back.. But no one is replying for drawing control related questions. Is Microsoft will release any help or support on this? If so, when we can expect the same.. Thanks, Phani As an MSDN subscriber trying to work with theDrawing Control I echo these comments. I guess we'll have to wait until late October until Visio 2003 is released before we get any meaningful documentation ... but it would be nice is Microsoft could answer some of the questions raised - after all that IS what these newgroups are for. Any chance of anyone from Microsoft a...

Subform Filter
I have a main form called "frmEmployeeDetails" and I have an issue form called "frmIssues". The Employee details form & the issue form are linked based off the employee name, which is a drop down box in the Employee Details table. (I know I should use employee number, but in this case I have to use the employee name as the primary key). This is the only field that actually gets entered in the Employee details table, all the other fields are dlookups based on the employee name. I currently have the issue form open as a pop-up window based off a command b...

control recording saving
I designing a form the feilds are bound. the form will be used by other workers i want the form to update records using a update button but if the user enters data and then decides that they don't want to update the information. hqw can i prevent the update of the information entered on the form when the user closes the form using the close button "904allen" <904allen@discussions.microsoft.com> wrote > I designing a form the feilds are bound. the form will > be used by other workers i want the form to update > records using a update button but if the user ...

How to wrap ActiveX controls inside another control?
I am trying to combine several activex controls to create a single activex control using VC++. I can't seem to get this to work, so I tried to wrap the acrobat control, and I have the same problems. <Background> We are trying to open the controls inside a JFrame with a java bridge. We tried this with VB and it works, as VB hides many features, but, there are some issues with licensing at run time vs. development time. The vendor told us this should work with VC++, but, we are having the init problems. </Background> In the CAcroWrapperCtrl class constructor I have: CAcroA...

VBA control disappears when copy sheet
Hello I need help with a problem i cannot understand. I'm using office 2003 and i have an excel document with several sheets. Some of that sheets have vba controls, in particular checkbox controls. When i create a copy of one of those sheets, the entire sheet is copied but without checkboxes. Can anyone help with this problem? How are you copying the sheet? Are you using: Edit|Move or copy sheet Ari Silva wrote: > > Hello > I need help with a problem i cannot understand. > I'm using office 2003 and i have an excel document with several sheets. > Some of that sheet...

setting focus of a control
I have a dialog form with two edit boxes and I was wondering how do I change focus from one edit box to the other in code so that when I hit enter the cursor automatically goes to the next edit box. Roger Take a look at WM_NEXTDLGCTL. It does more than just call SetFocus. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "R.H." <roger.huggins@intermec.com> wrote in message news:#giYsYcjDHA.3612@TK2MSFTNGP11.phx.gbl... | I have a dialog form with two edit boxes and I was wondering how do I change | focus from one edit box to the other in code so that when I hit enter the...

Adding AJAX Control Toolkit CollapsiblePanelExtender programmatically
I'd like to add an AJAX Control Toolkit extender, the Collapsible Panel, to a GridView row programmatically. My justification is this: I have rows that show stores. Some of the rows are chain businesses with multiple branch locations. Others are independent stores with only one location. For the chain stores, I need to expand the row, at the user's request, to show branch locations. But not on the independents where the location is already shown on the same line as the business name. Make sense? So, the CollapsiblePanelExtender with the ...

Accesiing the IO space of SMbus host controller
Hi, I need to develop a driver to read and write to a SMbus host controller. I have VIA VX855 chipset.My device is in the IO space of PCI bus 0 device 17 function 0. My device is in the motherboard so it is always connected.so it is not shown in the device manager. I looked into portIO driver but I am not sure how to get the base address of my device in the driver since it is not plug and play? Can anyone suggest me what should be my approach towards this? Thanks, vbkr Do I need to write a PCI function driver or portIO driver vbkr <vbkr@discussions.microsoft.c...

custom chart type with image control
I created a chart type that contained an image control (company logo) and a textbox. I saved that chart as a custom chart type. But when I selected that custom chart through the chart wizard in another workbook, the image and textbox controls didn't appear. I even edited with copy and paste those controls directly into -xlusrgal.xls- where custom chart types are held, but they refused to show up in my charts. Can it be done? and how? --- Message posted from http://www.ExcelForum.com/ ...

Best approach for Control control
I have three groups of controls all related to the same thing. each group represents the user choice in different ways mathematically. group one has two controls - visual mouse placement on two pictureboxes. groups two and three have three parameters- a slider and a text box for each param. the user can use any group to set his choice. as the user adjusts the controls in one group, the other groups must track as computed. so it is all coded up and as expected, I have interactions caused by programmatically setting one control and it trying to process it as if it saw the user a...

Saving Excel with ActiveX controls
Hi, I have some custom activeX controls. I am able to add these controls in Excel (2000) using Control toolbar and they work fine. But when I try to save the Excel file along with these controls, I get the following message. "Microsoft Excel cannot save this workbook because the control named QIChartControl1 does not support saving. To save the workbook, delete this control and then try save again". I tried saving Excel file by deleting just the above control and it worked fine. Any ideas on what could be wrong with the above Activex control? Thanks. ...

Some users cannot use ActiveX controls, what is wrong?
Hello, - I designed some Excel sheets using some ActiveX controls. - We have been using them for years. - Some of the Excel documents have Macros, some not. The users are having this issue even is there is no macro. The behavior is as following: - The user cannot even select the control, for example, clicking on a check box does not do anything. Trying to pick up a value in a DropDownList does nothing, the list do not even open. - This is like all controls are static pictures. Environment - Office 2007 under Vista - It works for me Office 2007/XP - I compared the various ...

Forms/Subforms Calculation issues
Hello. I have an orders form that contains customer id, order id and order date and it's control source is the order table. This also contains a text box for order subtotal, sales tax and order total. I have an orderdetailsubform based on the orderdetails table that contains product, quantity, unit price, discount, extended price and a unbound text box. I want extended price to be calculated automatically by setting it's control source to = quantity * unit price and then I set the unbound text box to = sum(extended price) - which should be my subtotal. In the ordersubtotal text box...

Problem with multiline tab control
Hi, I have a problem with a tab control that I just can't seem to figure out. I have a tab control that made multi-line capable with m_ctrlTab.ModifyStyle(TCS_MULTILINE,TCS_MULTILINE); but, ever since I made the change I can't seem to display whichever tab I want upon application startup. It used to be a regular single-line tab (with 5 tabs) but I'm running out of space which is why I need a multiline solution. I have 6 tabs right now, three in one row. My code looks like this: ------------------------------- snip ------------------------------- BOOL Cxxxx:OnInitDialog() { ...

Multiple copies of webbrowser control and site logins
Hi, I have several processes accessing a website, each through a webbrowser control. I do not need to login to the site to access any information. However, to update data on the site I do. So if I log in to the site using one webbrowser control are all the other instances automatically logged in? Will the admin of the site have available the info that I am running one process logged in and several that are not? If so, is there away of masking this information - without slowing access to the site (particularly as I "hand code" GETs and PUTs)? I need to know as the system design o...

Controlling Line/Bar axis's
When using Line/Bar charts, is there a way to contol the series as to which one is used? If you have 4 or more series, sometimes I'd like to only have one Y axis. Same for using 6 or more series, the default is to divide the series in half, but I'd like to controll what series goes to either axis. Thanks, Randy Randy - Those built-in custom types seem convenient at first, don't they. Here's a better way, which takes a few more seconds, but gives you complete control. Make your chart with all the data showing up as one chart type (bar or line, use the one which you...

Not able to handle WM_CHAR in CStatic-derived control
Hello, I have a CStatic-derived control inside a CFormView-derived window. That control would need to handle WM_CHAR messages, so I have written the corresponding OnChar handle as a member of the control class. Unfortunately, nothing happens durgin the execution when I press a key like 'a'. The code inside "OnChar()" never gets reached (I have put a "AfxMessageBox()" in it for tracking). The focus is own by th control, I have verified it. I would really appreciate some help in finding out the cause of this strange (to me) behaviour. T...

Dates in subform
I need to make a Form where the user type: SampleID: 1234 StartDate: 01-01-2010 EndDate: 01-01-2015 CheckEvery: 3 (There will be more fields but these are the most important) On this form there should be a subForm because in the subForm it will show all the due dates: 0 3 6 9 12 15 01-01-2010 01-03-2010 01-06-2010 01-09-2010 01-12-2010 01-03- 2012 ...and it continues until it reaches the last date 01-01-2015. In the “checkEvery” textbox the user should be able to write a ...

Can I hyperlink based on a control selection event?
I'd like to use Publisher for an interactive web application prototype to validate requirements with users. I need to be able to build realistic screens quickly and to change them on the fly as the user reacts. I don't need an actual database. I just want them to visualize what happens as they might use an app. Is there a way to hyperlink to another publisher page based on a control selection? An example would be to move to another page based on a radio button or drop down list selection. Selecting Yes would link to one page and No would link to a different page. If this ...

SubForm record redisplay
AC 2003. I have a form with a subform in datasheet view. I do not allow Add records in the subform, but provide a button on the main form that opens another form which adds one or more records to the table in the subform. How can I get the subform to redisplay showing the newly added records? I thought subform.requery would work but it doesn't. Are the name of the subform control and the name of the form being used as a subform (the SourceObject property of the subform control) the same? If they're different, it's the control name you need to use, not the form name. If that ...