Search results

  1. D

    Looping Problem

    Fair point! OpenRecordCheck is a count of all of the records on the form OpenRecordCheck = DCount("[ExID]", "[Technical_Incident _Report Query]", WhereClause) TurnBlack is a procedure that turns a button black thats all The important bit is: If Me.txtsite = 0 Then...
  2. D

    Looping Problem

    Im trying to loop through the records on a form but Im unsure how to do it! Below is the code I have written so far but it dosent work! Ive read through lots of articales but cant seem to understand how do it. If Me.txtsite = 0 Then Do...
  3. D

    Check Conditions Are Met

    I could really use some help on this guys, I know I need a loop and have read some stuff but I just dont understand it. Thanks
  4. D

    Simple DCount Help Please

    Yeah, thanks, I realsie that but this is just the first piece of something Im improving on, the message box wont matter in the end. But thanks afor the help anyways
  5. D

    Check Conditions Are Met

    How do I loop through all the records in a query to check if conditions are met please. This is the code that I have right now, it checks to see if there are any records in the query and then I need it to check to see that Me.AnalystAttended is not an empty field and I need it to do that for...
  6. D

    Simple DCount Help Please

    Many thanks, spot on.
  7. D

    Simple DCount Help Please

    I am trying to count the amount of records in a table and see if the number is greater than 0, if it is then I want a message box stating how many records there are. This is my code the problem is that I cant get it to count correctly and have no idea how to get the value, (when correct) into...
  8. D

    Filling in Workisheets from the Top

    On my soreadsheet I want to fill in the other worksheets depend on the criteria entered on the 1st sheet (Entrants). the problem I have is that although it is working, gaps get left, I want to fill from the top. I have attached my spreadsheet. Many thanks
  9. D

    Running a Module

    Main form is: frmAssetManager, Subform is: frmCR2WR, the two fields to populate are: AvailCR2s and CountCR2s
  10. D

    Running a Module

    Just done that, I dont get the error now but it dosent zero the text boxes that show the qtys i.e. {AvailCR2s and CountCR2s) on the subform.
  11. D

    Running a Module

    Here is the code, it was written a Public Function on the Subform. But I want to use it globaley so tried to do it as a module: Public Function CR2Count() Dim someText, onlyNull As Integer someText = 0 onlyNull = 0 For Each ctl In Forms![frmCR2WR].Controls If...
  12. D

    Running a Module

    I have a module (CR2Count) that I am trying to run from a subform. How do I code that in please? I have put CR2Count which is what I would do if it were a public function. But with a module I get Compile Error: Expected variable or procedure, not module. Thanks
  13. D

    Counting Controls

    Iv'e written the code into a module to make it accessible from the main form, but it dosent sem to be working! Any ideas? Public Function CR2Count() Dim someText, onlyNull As Integer someText = 0 onlyNull = 0 For Each ctl In Forms![frmCR2WR].Controls If ctl.ControlType...
  14. D

    Counting Controls

    Thanks for the advise, but Iv'e got it working now so just need to sort the percetage out (struggling) I have a way but its not based on a calculation, its me working it out manually and hard coding it in (not good) so if anyone can elp me that would be cool, thanks
  15. D

    Counting Controls

    I did consider that but wasnt sure where to start with it!:banghead:
  16. D

    Counting Controls

    This is superb:D Final question and I will be able to apply this in so many ways/places is it possible to show the figure as a percentage? I have 10 text boxes begining CR2. Again many thanks for your help.
  17. D

    Counting Controls

    Is it possible to take this a stage furthur anddo something like: Dim ctl As Control Dim someText, onlyNull as Integer someText = 0 onlyNull = 0 For Each ctl In Me.Controls If ctl.ControlType = 109 WHERE the name of the control name begins with CR2 Then If Len(ctl.Value & "")=0 Then...
  18. D

    Counting Controls

    The textboxes are bound, but the one that holds the number of textboxes with a value is unbound.
  19. D

    Counting Controls

    How can I count the amount of controls on a subform (CR2andWR) and determine how many of them have a value in them i.e Not IsNull. I have a 10 textboxes (A1, A2, A3 up to A10). I want to show the number in a textbox on the mainform (frmAssetManager.Used). I'm thinking that showing it as a...
  20. D

    Counting

    On my form I have 8 text boxes with the 8th one being unbound. I would like the 8th to display a count of how many of the other text boxes have a value in them. How would I do this please?
Back
Top Bottom