Search results

  1. C

    How to create a field similar to a unique identifier field

    Thanks for this, your message came up after i typed my recent post. How would i define ID to link to the speciifc table or should i just bind the textbox im using in the form to that specific table?
  2. C

    How to create a field similar to a unique identifier field

    Hi I have tried option 1 above but the code doesnt seem to fire Dim i As Integer Dim OldBatch As Integer Dim Newbatch As Integer Dim db As Database Dim rs As Recordset Set db = CurrentDb Set rs = db.OpenRecordset("Tbl_BatchNo") For i = 0 To RecordCount - 1 If rs.Fields("id") = 1...
  3. C

    How to create a field similar to a unique identifier field

    CHeers Pbaldy. Yep appreciate it isnts a unique number by itself. Explained to business but there rationale is that they only creat about 2000 batches a year so when looking at stock on floor chances of 2 batches of 4444 are slim especially of the same product. Am also writing code in to add the...
  4. C

    How to create a field similar to a unique identifier field

    Hi. THanks for speedy response. Think i understand what you are saying. So for example when i load the form I would get it to lookup the single record in Tbl_batchno and add 1 to the number in question. When i clicked save in the form to save the batch as part of that sequence i would update...
  5. C

    How to create a field similar to a unique identifier field

    Hi I have a form where i enter batches of products created, and record the when, where how many were created. Everytime a batch of products is created it get a unique 4 digit code. Due to internal business purposes it cant be more than 4 digits. So what i am looking in vba is 3 fold: 1. How...
  6. C

    Form dissappeared when filter navigation by category

    Stupid question but how do I check if I have renamed the shortcut?
  7. C

    Form dissappeared when filter navigation by category

    Hi. It doesn’t appear in list of unassigned objects and if I search at top for it by typing in form name it returns no results. I checked the search is working correctly by searching for a form I can see is present and it returns the form as you would expect.
  8. C

    Form dissappeared when filter navigation by category

    Hi Just come back to a project after a long gap. Wanted to amend a form and can see it is no longer where i left (Frm_Variety) was part of the variety category you cansee in First attachment. However i know it still exists as the form still works as i can call it to open from another form...
  9. C

    cmd filtermenu issue

    Hi You guys have previously helped me design a continuous form with a column headers. On each header is a cmd button i click to bring up the default filter menu using the following code: DoCmd.GoToControl "Txt_Column1" DoCmd.GoToRecord , "", acFirst DoCmd.RunCommand acCmdFilterMenu Works...
  10. C

    Turning filtered data in a sub form into a report

    Spoke too soon. THe filters are now applying but any sort orders i have selected are not transferring. Any ideas on that?
  11. C

    Turning filtered data in a sub form into a report

    OK i have figured it out. DoCmd.OpenReport "Report1", acViewReport, , Me.Frm_Subform.Form.Filter THis code works but i was making 1 error. THe recordsource for the report was not the same named query as the query in the subform. THe design in each was identical but it seems that...
  12. C

    Turning filtered data in a sub form into a report

    HI PLease see attached some screenshots of the underlying query build and the main form i am using. To reiterate i can get the report to work correctly and open if i just use the textbox search function. But if i use the inbuilt filters i get the parameter requests attached.
  13. C

    Turning filtered data in a sub form into a report

    COnfused in a way that the export data button works with following code but a parameter is being asked for when trying to populate a report Dim strSql As String Dim TempQdf As QueryDef Dim db As DAO.Database Set db = CurrentDb strSql = "Select * from Qry_Main_VarietyForm" If...
  14. C

    Turning filtered data in a sub form into a report

    Hi Gasman The subform control is called Frm_Subform and the source object within is called Frm_Main_Variety
  15. C

    Turning filtered data in a sub form into a report

    Hi Tested following code DoCmd.OpenReport "report1", acViewReport, "Qry_Main_VarietyForm", Me.Frm_Subform.Form.Filter And when i click on button it pops open an enter parameter dialog box. If i remove the , Me.Frm_Subform.Form.Filter from the code it runs normally. Any ideas why this...
  16. C

    Turning filtered data in a sub form into a report

    Hi. Annoyingly laptop flat to test your theory. Quick one. Instead of me.filter should it be me.frm_subfom.form.filter
  17. C

    Turning filtered data in a sub form into a report

    Hi I have a mainform and in the header of that form their is a command button to create a report. WHat i have in the form is the header of the main form, then a subform within the detail of the form. THe subform is a continuous form made to look like a posh datasheet which is able to be...
  18. C

    Export Data from data query in a subform

    HI Guys. I have noticed a snag in the code. When i export data and i have filtered data so by selecting it to only show me Fruit the export works great. I then reset my data in the form or filter it antoher way and export again but it just exports the fruit data again and not the new data...
  19. C

    Export Data from data query in a subform

    You guys are great. Code worked perfectly. THank you so much for your contribution.
  20. C

    Export Data from data query in a subform

    Couple of things from reading ur code im unsure on strSql = "Select * from QualQ1" 'WHAT IS QUALQ1??? If Me.Filter <> "" Then strSql = strSql & " WHERE " & Me.Filter End If Set TempQdf = db.CreateQueryDef("ExportFiltered", strSql) 'Exportfiltered where did that name come from...
Back
Top Bottom