473,378 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Subform filter not working

54
I have a combo box with a list a values that when picked the form should filter to show the corresponding record from a table. Everything works fine when I open up the form by itself. However, I want this form to be a subform but when I put it in another form the filters quit working. Here is the code for the filter.

Expand|Select|Wrap|Line Numbers
  1. Private Sub finditem_AfterUpdate()
  2. Dim strFilter As String, strOldFilter As String
  3.     strOldFilter = Me.Filter
  4.     If Me!finditem > "" Then _
  5.         strFilter = strFilter & _
  6.                     " AND ([Chemical] Like '" & _
  7.                     Me!finditem & "*')"
  8.     If strFilter > "" Then strFilter = Mid(strFilter, 6)
  9.     If strFilter <> strOldFilter Then
  10.         Me.Filter = strFilter
  11.         Me.FilterOn = (strFilter > "")
  12.     End If
  13. End Sub
Aug 27 '12 #1
18 7975
zmbd
5,501 Expert Mod 4TB
Becker,

Replace the "Me" identifiers with the form's name (lines 3, 7, 10, etc...)

You'll find that forms that work fine by themselves with a Me reference will often break when used as a subform. I've found that replaceing the Me with the form's actual name often fixes this issue.

-z
Aug 27 '12 #2
Becker
54
I changed the code to
Expand|Select|Wrap|Line Numbers
  1. Private Sub finditem_AfterUpdate()
  2. Dim strFilter As String, strOldFilter As String
  3.     strOldFilter = Me.Filter
  4.     If Forms!orderhistory!finditem > "" Then _
  5.         strFilter = strFilter & _
  6.                     " AND ([Chemical] Like '" & _
  7.                     Forms!orderhistory!finditem & "*')"
  8.     If strFilter > "" Then strFilter = Mid(strFilter, 6)
  9.     If strFilter <> strOldFilter Then
  10.         Forms!orderhistory.Filter = strFilter
  11.         Forms!orderhistory.FilterOn = (strFilter > "")
  12.     End If
  13. End Sub
This doesn't seem to work. It says that it cannot find the form. I have this subform in another form with the exact same code I gave first and it works. Just this one doesn't work.
Aug 27 '12 #3
ariful alam
185 100+
you can embed a macro having "requery" action in the "onchange" event of the combo box. this will requery the records of the sub-form every time when you change the value of the combo box.
Aug 27 '12 #4
NeoPa
32,556 Expert Mod 16PB
Are you changing the form that is being filtered? Me only refers to the form that is associated with the module the code is running within. If you're referring to any other form then Me will simply be a wrong reference.

Otherwise, the Me reference should work fine.
Aug 27 '12 #5
Becker
54
It is the subform that is being filtered. It just happens to be viewed from within another form so me should work. Like I said if I open the subform by itself then the filter works, but if I open the main form to view the subform then the filter no longer works.

This is actually happening with both subforms on this main form.
Aug 27 '12 #6
NeoPa
32,556 Expert Mod 16PB
Ariful,

What are you referring to? It doesn't appear to be anything in this thread.

I hope you're not encouraging the use of macros in an Access project? That is a very clumsy approach, and it certainly doesn't fit this question. MS push it because it makes their lives easier. There is no discernable reason why any expert should ever encourage such an approach, which is known to cause Access projects so many unnecessary problems (It is, after all, a severeley restricted approach to logic expression and development).
Aug 27 '12 #7
NeoPa
32,556 Expert Mod 16PB
Becker:
It is the subform that is being filtered. It just happens to be viewed from within another form so me should work.
You fail to make it clear where the code is housed. That is the crux of the point I was making and I cannot proceed without an understanding of the situation, I'm afraid.
Aug 27 '12 #8
Becker
54
I have frmorder where users can go to place an order. On that same form is a subform "orderhistory" where they can scroll through past orders as they create new ones on the main form. On the subform they choose an item from a combo box. In the after update event on the combo box on the subform I have the following code.
Expand|Select|Wrap|Line Numbers
  1. Dim strFilter As String, strOldFilter As String
  2.     strOldFilter = Me.Filter
  3.     If Me!finditem > "" Then _
  4.         strFilter = strFilter & _
  5.                     " AND ([Chemical] Like '" & _
  6.                     Me!finditem & "*')"
  7.     If strFilter > "" Then strFilter = Mid(strFilter, 6)
  8.     If strFilter <> strOldFilter Then
  9.         Me.Filter = strFilter
  10.         Me.FilterOn = (strFilter > "")
  11.     End If
This code should filter the subform so that as they scroll through old records they only see the records for the item they selected.

If I open the subform by itself then the filter works. If I open the main form and then use the combo box and filter in the subform it no longer works. The combo box and code both lie within the subform. Everything that the code would effect lies within the subform. I apologize for me explaining skills. I hope this makes things more clear. Thanks.
Aug 27 '12 #9
NeoPa
32,556 Expert Mod 16PB
That's now Crystal Becker.

I'm surprised only by the facts as you describe them. I would not expect this code to work any less effectively when run from a subform than it would when run from a main form. If it had references to the Forms collection then that wouldn't surprise me, but references to Me always refer to the associated form, and the form will have Filter and FilterOn properties both when run as a Main Form as well as a Sub-Form. I'm afraid I see nothing that explains the behaviour you describe. In your position I'd be interested in seeing exactly what's happening where. Not something I can easily help with from a distance though, I'm afraid.

PS. I don't imagine something as fundamental as this is version dependent. I use 2003 but I doubt later versions would change something as fundamental as this.
Aug 28 '12 #10
Becker
54
I am very new at access (taught myself 10 weeks ago) and am so confused by this. The form filter works well alone and well in another form but not in this form. I even started over and recreated the form and it still doesn't work. I guess I will just have to play around with it some more. Thanks for the time and trying though.
Aug 28 '12 #11
zmbd
5,501 Expert Mod 4TB
Becker,
I am suspecting that there must be something funky with the parent/child.

In the PARENT form in the ONLOAD event place the following code:
Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Private Sub Form_Load()
  5.  
  6. '<<<<<COPY THIS TO THE ONLOAD EVENT OF THE PARENT FORM!
  7. '<<<<<REMOVE AFTER TROUBLE SHOOTING
  8. '<<<<<Start the copy here:
  9. Dim zctrlgrp As Controls
  10. Dim zctrl As Control
  11. Dim zprptygrp As Properties
  12. Dim zprpty As Property
  13. Dim zstr As String
  14. Dim zfile As String
  15. '
  16. On Error GoTo zerror
  17. '
  18. 'Open a text file for output
  19. zfile = Environ("userprofile")
  20. zfile = zfile & "\z_debugtext.txt"
  21. Open zfile For Append As #1
  22. '
  23. 'Get the properties for the the main form:
  24. Print #1, "<Parent Form>" & vbCrLf
  25. '
  26. Set zctrlgrp = Me.Controls
  27. Set zprptygrp = Me.Properties
  28. '
  29. '
  30. Print #1, "Properties for Main Form: " & Me.Name
  31. For Each zprpty In zprptygrp
  32.     Print #1, "Prpty Name: " & zprpty.Name
  33.     Print #1, "      Value: " & Nz(zprpty.Value, "(null)")
  34. Next zprpty
  35. Print #1, "·····································································" & vbCrLf
  36. '
  37. Print #1, ">Search for subforms and print their properties" & vbCrLf
  38. '
  39. 'Let's look for subforms and list their properties
  40. For Each zctrl In zctrlgrp
  41.     If zctrl.ControlType = 112 Then
  42.         zctrl.SetFocus
  43.         Set zprptygrp = zctrl.Properties
  44.         Print #1, "---------------------------------------------------"
  45.         Print #1, "SubForm Name: " & zctrl.Name
  46.         For Each zprpty In zprptygrp
  47.             Print #1, "Prpty Name: " & zprpty.Name
  48.             Print #1, "      Value: " & Nz(zprpty.Value, "(null)")
  49.         Next zprpty
  50.     End If
  51. Next zctrl
  52. Print #1, "·····································································"
  53. '
  54. Set zprptygrp = Nothing
  55. Set zctrlgrp = Nothing
  56. Close #1
  57. MsgBox "Please locate and open the following file:" & vbCrLf & _
  58.     zfile & vbCrLf & _
  59.     "Post the contents to the forum you found this code on." & vbCrLf & _
  60.     "-z"
  61. Exit Sub
  62. zerror:
  63. Debug.Print "#error - resuming: " & Err.Description
  64. Resume Next
  65. '
  66. '<<<<<<
  67. '<<<<<<END THE COPY HERE
  68. End Sub
This code should create at text file named "z_debugtext.txt" in the root of your user folder with the properties of the parent form and and subforms.

As there will be hundreds of lines in the file... just upload the text file.

The only other option is to zip and upload the DB.

-z
Aug 28 '12 #12
Becker
54
Although not code, here is the contents of the file in the code brackets, for simplicities sake.
Expand|Select|Wrap|Line Numbers
  1. ·····································································
  2. <Parent Form> 
  3.  
  4. Properties for Main Form: ordering chemicals 
  5. Prpty Name: RecordSource 
  6.       Value: Ordering Information 
  7. Prpty Name: Caption 
  8.       Value:  
  9. Prpty Name: PopUp 
  10.       Value: False 
  11. Prpty Name: Modal 
  12.       Value: False 
  13. Prpty Name: DisplayOnSharePointSite 
  14.       Value: 1 
  15. Prpty Name: DefaultView 
  16.       Value: 0 
  17. Prpty Name: ViewsAllowed 
  18.       Value: 0 
  19. Prpty Name: AllowFormView 
  20.       Value: True 
  21. Prpty Name: AllowDatasheetView 
  22.       Value: False 
  23. Prpty Name: AllowPivotTableView 
  24.       Value: False 
  25. Prpty Name: AllowPivotChartView 
  26.       Value: False 
  27. Prpty Name: AllowLayoutView 
  28.       Value: True 
  29. Prpty Name: Picture 
  30.       Value: (none) 
  31. Prpty Name: PictureTiling 
  32.       Value: False 
  33. Prpty Name: PictureAlignment 
  34.       Value: 2 
  35. Prpty Name: PictureType 
  36.       Value: 0 
  37. Prpty Name: PictureSizeMode 
  38.       Value: 0 
  39. Prpty Name: Width 
  40.       Value: 26055 
  41. Prpty Name: AutoCenter 
  42.       Value: False 
  43. Prpty Name: AutoResize 
  44.       Value: True 
  45. Prpty Name: FitToScreen 
  46.       Value: True 
  47. Prpty Name: BorderStyle 
  48.       Value: 2 
  49. Prpty Name: RecordSelectors 
  50.       Value: False 
  51. Prpty Name: NavigationButtons 
  52.       Value: False 
  53. Prpty Name: NavigationCaption 
  54.       Value:  
  55. Prpty Name: DividingLines 
  56.       Value: False 
  57. Prpty Name: ScrollBars 
  58.       Value: 3 
  59. Prpty Name: ControlBox 
  60.       Value: False 
  61. Prpty Name: CloseButton 
  62.       Value: False 
  63. Prpty Name: MinButton 
  64.       Value: False 
  65. Prpty Name: MaxButton 
  66.       Value: False 
  67. Prpty Name: MinMaxButtons 
  68.       Value: 0 
  69. Prpty Name: Moveable 
  70.       Value: False 
  71. Prpty Name: SplitFormSize 
  72.       Value: 0 
  73. Prpty Name: SplitFormOrientation 
  74.       Value: 0 
  75. Prpty Name: SplitFormSplitterBar 
  76.       Value: False 
  77. Prpty Name: SplitFormDatasheet 
  78.       Value: 0 
  79. Prpty Name: SplitFormPrinting 
  80.       Value: 0 
  81. Prpty Name: SaveSplitterBarPosition 
  82.       Value: False 
  83. Prpty Name: SubdatasheetExpanded 
  84.       Value: False 
  85. Prpty Name: SubdatasheetHeight 
  86.       Value: 0 
  87. Prpty Name: GridX 
  88.       Value: 24 
  89. Prpty Name: GridY 
  90.       Value: 24 
  91. Prpty Name: LayoutForPrint 
  92.       Value: False 
  93. Prpty Name: Orientation 
  94.       Value: 0 
  95. Prpty Name: RecordsetType 
  96.       Value: 0 
  97. Prpty Name: FetchDefaults 
  98.       Value: True 
  99. Prpty Name: Filter 
  100.       Value: ([Chemical] Like '2" rack bar*') 
  101. Prpty Name: FilterOn 
  102.       Value: False 
  103. Prpty Name: FilterOnLoad 
  104.       Value: False 
  105. Prpty Name: OrderBy 
  106.       Value:  
  107. Prpty Name: OrderByOn 
  108.       Value: False 
  109. Prpty Name: OrderByOnLoad 
  110.       Value: True 
  111. Prpty Name: DataEntry 
  112.       Value: False 
  113. Prpty Name: AllowAdditions 
  114.       Value: True 
  115. Prpty Name: AllowDeletions 
  116.       Value: True 
  117. Prpty Name: AllowEdits 
  118.       Value: True 
  119. Prpty Name: AllowFilters 
  120.       Value: True 
  121. Prpty Name: OnCurrent 
  122.       Value:  
  123. Prpty Name: OnCurrentEmMacro 
  124.       Value:  
  125. Prpty Name: OnLoad 
  126.       Value: [Event Procedure] 
  127. Prpty Name: OnLoadEmMacro 
  128.       Value:  
  129. Prpty Name: OnClick 
  130.       Value:  
  131. Prpty Name: OnClickEmMacro 
  132.       Value:  
  133. Prpty Name: AfterUpdate 
  134.       Value:  
  135. Prpty Name: AfterUpdateEmMacro 
  136.       Value:  
  137. Prpty Name: BeforeUpdate 
  138.       Value:  
  139. Prpty Name: BeforeUpdateEmMacro 
  140.       Value:  
  141. Prpty Name: BeforeInsert 
  142.       Value:  
  143. Prpty Name: BeforeInsertEmMacro 
  144.       Value:  
  145. Prpty Name: AfterInsert 
  146.       Value:  
  147. Prpty Name: AfterInsertEmMacro 
  148.       Value:  
  149. Prpty Name: BeforeDelConfirm 
  150.       Value:  
  151. Prpty Name: BeforeDelConfirmEmMacro 
  152.       Value:  
  153. Prpty Name: OnDelete 
  154.       Value:  
  155. Prpty Name: OnDeleteEmMacro 
  156.       Value:  
  157. Prpty Name: AfterDelConfirm 
  158.       Value:  
  159. Prpty Name: AfterDelConfirmEmMacro 
  160.       Value:  
  161. Prpty Name: OnDirty 
  162.       Value:  
  163. Prpty Name: OnDirtyEmMacro 
  164.       Value:  
  165. Prpty Name: OnGotFocus 
  166.       Value:  
  167. Prpty Name: OnGotFocusEmMacro 
  168.       Value:  
  169. Prpty Name: OnLostFocus 
  170.       Value:  
  171. Prpty Name: OnLostFocusEmMacro 
  172.       Value:  
  173. Prpty Name: OnDblClick 
  174.       Value:  
  175. Prpty Name: OnDblClickEmMacro 
  176.       Value:  
  177. Prpty Name: OnMouseDown 
  178.       Value:  
  179. Prpty Name: OnMouseDownEmMacro 
  180.       Value:  
  181. Prpty Name: OnMouseUp 
  182.       Value:  
  183. Prpty Name: OnMouseUpEmMacro 
  184.       Value:  
  185. Prpty Name: OnMouseMove 
  186.       Value:  
  187. Prpty Name: OnMouseMoveEmMacro 
  188.       Value:  
  189. Prpty Name: OnKeyUp 
  190.       Value:  
  191. Prpty Name: OnKeyUpEmMacro 
  192.       Value:  
  193. Prpty Name: OnKeyDown 
  194.       Value:  
  195. Prpty Name: OnKeyDownEmMacro 
  196.       Value:  
  197. Prpty Name: OnKeyPress 
  198.       Value:  
  199. Prpty Name: OnKeyPressEmMacro 
  200.       Value:  
  201. Prpty Name: OnUndo 
  202.       Value:  
  203. Prpty Name: OnUndoEmMacro 
  204.       Value:  
  205. Prpty Name: OnOpen 
  206.       Value: [Event Procedure] 
  207. Prpty Name: OnOpenEmMacro 
  208.       Value:  
  209. Prpty Name: OnClose 
  210.       Value: [Event Procedure] 
  211. Prpty Name: OnCloseEmMacro 
  212.       Value:  
  213. Prpty Name: OnResize 
  214.       Value:  
  215. Prpty Name: OnResizeEmMacro 
  216.       Value:  
  217. Prpty Name: OnActivate 
  218.       Value:  
  219. Prpty Name: OnActivateEmMacro 
  220.       Value:  
  221. Prpty Name: OnDeactivate 
  222.       Value:  
  223. Prpty Name: OnDeactivateEmMacro 
  224.       Value:  
  225. Prpty Name: OnUnload 
  226.       Value:  
  227. Prpty Name: OnUnloadEmMacro 
  228.       Value:  
  229. Prpty Name: OnError 
  230.       Value:  
  231. Prpty Name: OnErrorEmMacro 
  232.       Value:  
  233. Prpty Name: OnMouseWheel 
  234.       Value:  
  235. Prpty Name: MouseWheelEmMacro 
  236.       Value:  
  237. Prpty Name: OnFilter 
  238.       Value:  
  239. Prpty Name: OnFilterEmMacro 
  240.       Value:  
  241. Prpty Name: OnApplyFilter 
  242.       Value:  
  243. Prpty Name: OnApplyFilterEmMacro 
  244.       Value:  
  245. Prpty Name: OnTimer 
  246.       Value:  
  247. Prpty Name: OnTimerEmMacro 
  248.       Value:  
  249. Prpty Name: TimerInterval 
  250.       Value: 0 
  251. Prpty Name: OnSelectionChange 
  252.       Value:  
  253. Prpty Name: SelectionChangeEmMacro 
  254.       Value:  
  255. Prpty Name: BeforeRender 
  256.       Value:  
  257. Prpty Name: BeforeRenderEmMacro 
  258.       Value:  
  259. Prpty Name: AfterFinalRender 
  260.       Value:  
  261. Prpty Name: AfterFinalRenderEmMacro 
  262.       Value:  
  263. Prpty Name: AfterRender 
  264.       Value:  
  265. Prpty Name: AfterRenderEmMacro 
  266.       Value:  
  267. Prpty Name: AfterLayout 
  268.       Value:  
  269. Prpty Name: AfterLayoutEmMacro 
  270.       Value:  
  271. Prpty Name: OnConnect 
  272.       Value:  
  273. Prpty Name: OnConnectEmMacro 
  274.       Value:  
  275. Prpty Name: OnDisconnect 
  276.       Value:  
  277. Prpty Name: OnDisconnectEmMacro 
  278.       Value:  
  279. Prpty Name: BeforeQuery 
  280.       Value:  
  281. Prpty Name: BeforeQueryEmMacro 
  282.       Value:  
  283. Prpty Name: OnQuery 
  284.       Value:  
  285. Prpty Name: QueryEmMacro 
  286.       Value:  
  287. Prpty Name: OnDataChange 
  288.       Value:  
  289. Prpty Name: DataChangeEmMacro 
  290.       Value:  
  291. Prpty Name: OnDataSetChange 
  292.       Value:  
  293. Prpty Name: DataSetChangeEmMacro 
  294.       Value:  
  295. Prpty Name: OnCmdExecute 
  296.       Value:  
  297. Prpty Name: CommandExecuteEmMacro 
  298.       Value:  
  299. Prpty Name: OnCmdBeforeExecute 
  300.       Value:  
  301. Prpty Name: CommandBeforeExecuteEmMacro 
  302.       Value:  
  303. Prpty Name: OnCmdEnabled 
  304.       Value:  
  305. Prpty Name: CommandEnabledEmMacro 
  306.       Value:  
  307. Prpty Name: OnCmdChecked 
  308.       Value:  
  309. Prpty Name: CommandCheckedEmMacro 
  310.       Value:  
  311. Prpty Name: OnViewChange 
  312.       Value:  
  313. Prpty Name: ViewChangeEmMacro 
  314.       Value:  
  315. Prpty Name: OnPivotTableChange 
  316.       Value:  
  317. Prpty Name: PivotTableChangeEmMacro 
  318.       Value:  
  319. Prpty Name: BeforeScreenTip 
  320.       Value:  
  321. Prpty Name: BeforeScreenTipEmMacro 
  322.       Value:  
  323. Prpty Name: Cycle 
  324.       Value: 0 
  325. Prpty Name: RecordLocks 
  326.       Value: 0 
  327. Prpty Name: RibbonName 
  328.       Value:  
  329. Prpty Name: Toolbar 
  330.       Value:  
  331. Prpty Name: ShortcutMenu 
  332.       Value: True 
  333. Prpty Name: MenuBar 
  334.       Value:  
  335. Prpty Name: ShortcutMenuBar 
  336.       Value:  
  337. Prpty Name: HelpFile 
  338.       Value:  
  339. Prpty Name: HelpContextId 
  340.       Value: 0 
  341. Prpty Name: HasModule 
  342.       Value: True 
  343. Prpty Name: UseDefaultPaperSize 
  344.       Value: False 
  345. Prpty Name: FastLaserPrinting 
  346.       Value: True 
  347. Prpty Name: Tag 
  348.       Value:  
  349. Prpty Name: PaletteSource 
  350.       Value: (Default) 
  351. Prpty Name: KeyPreview 
  352.       Value: False 
  353. Prpty Name: AllowEditing 
  354.       Value: True 
  355. Prpty Name: DefaultEditing 
  356.       Value: 2 
  357. Prpty Name: AllowUpdating 
  358.       Value: 0 
  359. Prpty Name: RowHeight 
  360.       Value: -1 
  361. Prpty Name: DatasheetFontName 
  362.       Value: Calibri 
  363. Prpty Name: DatasheetFontHeight 
  364.       Value: 11 
  365. Prpty Name: DatasheetFontWeight 
  366.       Value: 400 
  367. Prpty Name: DatasheetFontItalic 
  368.       Value: False 
  369. Prpty Name: DatasheetFontUnderline 
  370.       Value: False 
  371. Prpty Name: DatasheetGridlinesBehavior 
  372.       Value: 3 
  373. Prpty Name: DatasheetGridlinesColor 
  374.       Value: 15062992 
  375. Prpty Name: DatasheetCellsEffect 
  376.       Value: 0 
  377. Prpty Name: DatasheetForeColor 
  378.       Value: 0 
  379. Prpty Name: ShowGrid 
  380.       Value: True 
  381. Prpty Name: DatasheetBackColor 
  382.       Value: 16777215 
  383. Prpty Name: DatasheetAlternateBackColor 
  384.       Value: 16053492 
  385. Prpty Name: DatasheetBorderLineStyle 
  386.       Value: 1 
  387. Prpty Name: HorizontalDatasheetGridlineStyle 
  388.       Value: 1 
  389. Prpty Name: VerticalDatasheetGridlineStyle 
  390.       Value: 1 
  391. Prpty Name: DatasheetColumnHeaderUnderlineStyle 
  392.       Value: 1 
  393. Prpty Name: Hwnd 
  394.       Value: 7078650 
  395. Prpty Name: Count 
  396.       Value: 32 
  397. Prpty Name: LogicalPageWidth 
  398.       Value: 11520 
  399. Prpty Name: Visible 
  400.       Value: True 
  401. Prpty Name: Painting 
  402.       Value: True 
  403. Prpty Name: PrtMip 
  404.       Value: U U U U   ? ?   U   ?    
  405. Prpty Name: PrtDevMode 
  406.       Value:                 ????c???d?? ???                         E ??        ??"?????              T                                                                                                                                                                                                                                                        ? ??  ?HP LaserJet P2050 Series PCL6 ?????????E??????????????????e???????e????????????e????????????g?????????????????????????????????????????????????????????????????????????????????????????n?????????e???e?F?????n???????????????????x??????????R?????????g?????????O????e????????????????????????????g??????e???????o?????????d??e????????????s????T????????????n?????????????p??e????????????d??e????????????????o????????????s?????????????????????????????????N???????????????N????????p????2?????????e??????????a?????????????????????????????6??????????e??????g???????????????e?????????????????????????????????e???????????e??????????????????????l??????????g??e????????r??e???????????????e???????????b???????????s?????????????????????????????????????????????E????????????????E???????r???????????????e????????t???????????????????????????????e1??????????????????????????????s????E????????????????????????????e?????????h??e??????????????3??????????????????????????????????????????????s???????????????n???????e????????????n??????????????????????????s????????????????????g?????????????????E??????????????????E??????????????E????????????E???????????????????5??????????r???????????????l??????s???????????????????s???????????r????????????????????????4?????????????e??????????????????e                                                                 ? ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
  407. Prpty Name: PrtDevNames 
  408.       Value: &i                                                ???1 
  409. Prpty Name: FrozenColumns 
  410.       Value: 1 
  411. Prpty Name: Bookmark 
  412.       Value: ?  
  413. Prpty Name: Name 
  414.       Value: ordering chemicals 
  415. Prpty Name: PaintPalette 
  416.       Value: (null) 
  417. Prpty Name: OpenArgs 
  418.       Value: (null) 
  419. Prpty Name: Dirty 
  420.       Value: False 
  421. Prpty Name: WindowWidth 
  422.       Value: 11025 
  423. Prpty Name: WindowHeight 
  424.       Value: 12135 
  425. Prpty Name: CurrentView 
  426.       Value: 1 
  427. Prpty Name: CurrentSectionTop 
  428.       Value: 11325 
  429. Prpty Name: CurrentSectionLeft 
  430.       Value: 0 
  431. Prpty Name: SelLeft 
  432.       Value: 0 
  433. Prpty Name: SelTop 
  434.       Value: 0 
  435. Prpty Name: SelWidth 
  436.       Value: 0 
  437. Prpty Name: SelHeight 
  438.       Value: 0 
  439. Prpty Name: CurrentRecord 
  440.       Value: 0 
  441. Prpty Name: PictureData 
  442.       Value: (null) 
  443. Prpty Name: InsideHeight 
  444.       Value: 11310 
  445. Prpty Name: InsideWidth 
  446.       Value: 10590 
  447. Prpty Name: PicturePalette 
  448.       Value: (null) 
  449. Prpty Name: AllowDesignChanges 
  450.       Value: True 
  451. Prpty Name: WindowTop 
  452.       Value: 240 
  453. Prpty Name: WindowLeft 
  454.       Value: 4890 
  455. Prpty Name: ImageData 
  456.       Value: ??  ???  
  457.  Ÿl???lÄ ¤?Ÿl??l ??Ÿl?????????????   ¿ ????? ??Ÿl???????????????????????????????l ? 
  458.  ?l  
  459. ····································································· 
  460.  
  461. >Search for subforms and print their properties 
  462.  
  463. --------------------------------------------------- 
  464. SubForm Name: OrderSub 
  465. Prpty Name: EventProcPrefix 
  466.       Value: OrderSub 
  467. Prpty Name: Name 
  468.       Value: OrderSub 
  469. Prpty Name: ControlType 
  470.       Value: 112 
  471. Prpty Name: Visible 
  472.       Value: True 
  473. Prpty Name: SourceObject 
  474.       Value: OrderSub 
  475. Prpty Name: LinkMasterFields 
  476.       Value: Chemical 
  477. Prpty Name: LinkChildFields 
  478.       Value: Chemical 
  479. Prpty Name: Width 
  480.       Value: 6360 
  481. Prpty Name: Height 
  482.       Value: 7560 
  483. Prpty Name: Top 
  484.       Value: 0 
  485. Prpty Name: Left 
  486.       Value: 7800 
  487. Prpty Name: BorderStyle 
  488.       Value: 0 
  489. Prpty Name: OldBorderStyle 
  490.       Value: 0 
  491. Prpty Name: BorderLineStyle 
  492.       Value: 0 
  493. Prpty Name: BorderWidth 
  494.       Value: 0 
  495. Prpty Name: BorderColor 
  496.       Value: 12632256 
  497. Prpty Name: SpecialEffect 
  498.       Value: 0 
  499. Prpty Name: GridlineStyleTop 
  500.       Value: 0 
  501. Prpty Name: GridlineStyleBottom 
  502.       Value: 0 
  503. Prpty Name: GridlineStyleLeft 
  504.       Value: 0 
  505. Prpty Name: GridlineStyleRight 
  506.       Value: 0 
  507. Prpty Name: GridlineColor 
  508.       Value: 0 
  509. Prpty Name: GridlineWidthTop 
  510.       Value: 1 
  511. Prpty Name: GridlineWidthBottom 
  512.       Value: 1 
  513. Prpty Name: GridlineWidthLeft 
  514.       Value: 1 
  515. Prpty Name: GridlineWidthRight 
  516.       Value: 1 
  517. Prpty Name: TopPadding 
  518.       Value: 30 
  519. Prpty Name: BottomPadding 
  520.       Value: 30 
  521. Prpty Name: LeftPadding 
  522.       Value: 30 
  523. Prpty Name: RightPadding 
  524.       Value: 30 
  525. Prpty Name: HorizontalAnchor 
  526.       Value: 0 
  527. Prpty Name: VerticalAnchor 
  528.       Value: 0 
  529. Prpty Name: CanGrow 
  530.       Value: True 
  531. Prpty Name: CanShrink 
  532.       Value: False 
  533. Prpty Name: DisplayWhen 
  534.       Value: 0 
  535. Prpty Name: FilterOnEmptyMaster 
  536.       Value: True 
  537. Prpty Name: Enabled 
  538.       Value: True 
  539. Prpty Name: Locked 
  540.       Value: False 
  541. Prpty Name: OnEnter 
  542.       Value:  
  543. Prpty Name: OnEnterEmMacro 
  544.       Value:  
  545. Prpty Name: OnExit 
  546.       Value:  
  547. Prpty Name: OnExitEmMacro 
  548.       Value:  
  549. Prpty Name: TabIndex 
  550.       Value: 16 
  551. Prpty Name: TabStop 
  552.       Value: True 
  553. Prpty Name: StatusBarText 
  554.       Value:  
  555. Prpty Name: Tag 
  556.       Value:  
  557. Prpty Name: Section 
  558.       Value: 0 
  559. Prpty Name: InSelection 
  560. Prpty Name: Layout 
  561.       Value: 0 
  562. Prpty Name: LayoutID 
  563.       Value: 0 
  564. --------------------------------------------------- 
  565. SubForm Name: orderhistory 
  566. Prpty Name: EventProcPrefix 
  567.       Value: orderhistory 
  568. Prpty Name: Name 
  569.       Value: orderhistory 
  570. Prpty Name: ControlType 
  571.       Value: 112 
  572. Prpty Name: Visible 
  573.       Value: True 
  574. Prpty Name: SourceObject 
  575.       Value: orderhistory 
  576. Prpty Name: LinkMasterFields 
  577.       Value: Chemical 
  578. Prpty Name: LinkChildFields 
  579.       Value: Chemical 
  580. Prpty Name: Width 
  581.       Value: 9255 
  582. Prpty Name: Height 
  583.       Value: 8640 
  584. Prpty Name: Top 
  585.       Value: 0 
  586. Prpty Name: Left 
  587.       Value: 13200 
  588. Prpty Name: BorderStyle 
  589.       Value: 0 
  590. Prpty Name: OldBorderStyle 
  591.       Value: 0 
  592. Prpty Name: BorderLineStyle 
  593.       Value: 0 
  594. Prpty Name: BorderWidth 
  595.       Value: 0 
  596. Prpty Name: BorderColor 
  597.       Value: 12632256 
  598. Prpty Name: SpecialEffect 
  599.       Value: 0 
  600. Prpty Name: GridlineStyleTop 
  601.       Value: 0 
  602. Prpty Name: GridlineStyleBottom 
  603.       Value: 0 
  604. Prpty Name: GridlineStyleLeft 
  605.       Value: 0 
  606. Prpty Name: GridlineStyleRight 
  607.       Value: 0 
  608. Prpty Name: GridlineColor 
  609.       Value: 0 
  610. Prpty Name: GridlineWidthTop 
  611.       Value: 1 
  612. Prpty Name: GridlineWidthBottom 
  613.       Value: 1 
  614. Prpty Name: GridlineWidthLeft 
  615.       Value: 1 
  616. Prpty Name: GridlineWidthRight 
  617.       Value: 1 
  618. Prpty Name: TopPadding 
  619.       Value: 30 
  620. Prpty Name: BottomPadding 
  621.       Value: 30 
  622. Prpty Name: LeftPadding 
  623.       Value: 30 
  624. Prpty Name: RightPadding 
  625.       Value: 30 
  626. Prpty Name: HorizontalAnchor 
  627.       Value: 0 
  628. Prpty Name: VerticalAnchor 
  629.       Value: 0 
  630. Prpty Name: CanGrow 
  631.       Value: True 
  632. Prpty Name: CanShrink 
  633.       Value: False 
  634. Prpty Name: DisplayWhen 
  635.       Value: 0 
  636. Prpty Name: FilterOnEmptyMaster 
  637.       Value: True 
  638. Prpty Name: Enabled 
  639.       Value: True 
  640. Prpty Name: Locked 
  641.       Value: False 
  642. Prpty Name: OnEnter 
  643.       Value:  
  644. Prpty Name: OnEnterEmMacro 
  645.       Value:  
  646. Prpty Name: OnExit 
  647.       Value:  
  648. Prpty Name: OnExitEmMacro 
  649.       Value:  
  650. Prpty Name: TabIndex 
  651.       Value: 17 
  652. Prpty Name: TabStop 
  653.       Value: True 
  654. Prpty Name: StatusBarText 
  655.       Value:  
  656. Prpty Name: Tag 
  657.       Value:  
  658. Prpty Name: Section 
  659.       Value: 0 
  660. Prpty Name: InSelection 
  661. Prpty Name: Layout 
  662.       Value: 0 
  663. Prpty Name: LayoutID 
  664.       Value: 0 
  665. ····································································· 
  666.  
I hope this helps you help me because I am stumped. Thanks.
Aug 28 '12 #13
Becker
54
I just barely recreated the main form, again. This time I put the two subforms in, in a different order. Now the subform that I was having troubles with filters correctly, but now the other subform will not filter.
Aug 28 '12 #14
NeoPa
32,556 Expert Mod 16PB
Putting it in [ CODE ] tags is fine, and a good idea. Both easily visible and copyable for use if required :-)
Aug 28 '12 #15
zmbd
5,501 Expert Mod 4TB
Becker:

The code tags are fine and helps if the text needs to be copied out (which I did) and they isolate some of the funky charators that the properties can have in them.


"ordering chemicals" has a default filter set, may be a red-herring; however, let's start by removing that filter from the form.

-z
Aug 28 '12 #16
zmbd
5,501 Expert Mod 4TB
and that's what I get for haveing to walk away from the post...

The order shouldn't matter unless one is modifying the recordset before the other updates...

at this point I'll need to see the actual database...

can you make a copy, strip the data down to something generic and post the DB?
-z
Aug 28 '12 #17
Becker
54
I removed the default filters on the forms. Not sure why they were there but taking them off didn't change anything. Here is a copy of the database. The form Ordering_Chemicals is the one with the issues. The form Purchasing_Chemicals is a very similar one that does what ordering_chemicals will not. Thanks for your help!
Attached Files
File Type: zip TR Cards.zip (243.0 KB, 118 views)
Aug 28 '12 #18
zmbd
5,501 Expert Mod 4TB
Becker,

I took only a quick look at the DB you posted. With the way your database is designed, I doubt if you will get this to work. However, I just had a call from one of my site analytical labs that requires me to get the BFH out on an instrument so I won’t be able to really dig much more until later this evening.

In the meantime, I respectfully suggest that you consider starting from scratch. PLEASE understand, I really do mean this as a constructive statement and not with any intent of malice.
You need to read thru this: A Tutorial for Access
And you need to read thru: Database Normalization and Table Structures.
-Z
Aug 28 '12 #19

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Scott | last post by:
In my database, I have a form with a subform. I had everything working correctly - the correct records would display on the subform for each record on the form. I could edit, add, and delete on the...
8
by: Robert | last post by:
I have a form (Worksheet) that works fine by itself. I have now created a seperate form (MainForm) that has a command button in the header and an unbound subform (FormFrame) in the Detail section....
0
by: theBman | last post by:
I have 2 tables. One master, one child using Access 2003 (PC) Have 2 forms. The main form is continuous while the sub is datasheet. I can filter on the main form and the subform filters with...
9
by: natwong | last post by:
Hi All, I'm a newbie in terms of Access and some of its functionality . I've been stuck on this problem for a couple days, even after searching the Web, etc. Currently I have five combo boxes...
5
by: Gilberto | last post by:
Hello, I have a form with some code to HIDE textboxes and labels when information is not used. I need this information in a report so i added the form as a Subform/Subreport in a report. The...
1
by: maciejfr | last post by:
Hello everyone, My problem is updating Subform filter by onchange event in one of main form field I've got following: Me!.Form.Filter = " = "" N "" OR ( = ""T"" AND notanr = " & Me!nrnoty...
4
by: mrubel99 | last post by:
I have a subform built into a form in Access 2007. I would like the user to be able to filter the subform using their own criteria by right clicking the column header in the subform. Once the user...
0
by: diogenes | last post by:
"Rick Brandt" <rickbrandt2@hotmail.comwrote in news:bPnKj.456$%41.325 @nlpi064.nbdc.sbc.com: I used this approach, and it works a treat! ID In(SELECT Order_ID FROM orderitems WHERE NAME =...
4
WyvsEyeView
by: WyvsEyeView | last post by:
I am doing the very standard thing of filtering the contents of one combo box based on another combo box. I've done it many times, but always on a main form. Now I'm trying to do it on a datasheet...
1
by: rwalle | last post by:
Hi : I have done a form with a subform inside to filter customers, the form have a Text box where user write down a name then I take this text box data as a criteria to the query wich subform...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.