Search results

  1. H

    Query (Filtering?) in a Form

    I'm really confused now about what your question is or what you are trying to achieve. >I am required to make a form, so using [Please enter course code] for criteria in queries or a combo box is not what I am required. Is there any requirement that you cannot use VBA code?
  2. H

    Workdays Without Weekends/Holidays...Pos/Neg Values

    I don't think I understand what output you are expecting. Do you expect a number, like a long number or integer, something with decimals? When or why will it show negative? Can you post an example of a date range together with your desired our expected output for your given example data range?
  3. H

    Bind query to subform

    > So I do have to make a form with text boxes in it for each query. No, not necessarily. You do need to create the textboxes yes. However, you can change the row source on the textboxes every time you change the forms recordsource. However, I don't really recommend this approach. This gets...
  4. H

    Back color in subform

    I'll second that. You can do what you want with conditional formatting both in Datasheet view and in the regular form view. It's a better solution than using code unless code gives you some feature or benefit that conditional formatting cannot. You'll basically create two conditions using...
  5. H

    Query (Filtering?) in a Form

    Is there some reason you do not want to use VBA code for this? Is this for a class your taking that requires you not to use VBA? A parameter query might give you want you want without VBA although it isn't a very elegant solution. You mentioned that you need "course tutor, student id and full...
  6. H

    Actual size of a displayed string

    I don't know of any way to do what you're doing unless you take the time to build a library of some kind that knows the size of each character in each font. You would then have to iterate through all of the text and look up it's size in your CharacterSize table. I don't think this is worth it...
  7. H

    Bind query to subform

    All you have to do is change the RecordSource for the form. I put my SQL statements directly in the RecordSource property. No need to develop and save your queries unless you prefer to do that. You're going to have to change the recordsource (or is it rowsource) for each textbox if you're...
  8. H

    Update field Character Set used

    Are you hoping this field is automatically maintained without the user changing or selecting anything? Are you hoping to loop through existing records and update all of them? Or do you just need an extra field and a combo box so the user can fill it in every time?
  9. H

    Count number of records in form A and display result in Form B

    Apparently you're trying to do this all on a form/field level. My recommendation was to use VBA code instead. Is that something you're not familiar with and not comfortable doing? I do see an error in code where I was expecting you to get the task count in your subform's SQL statement. So...
  10. H

    Count number of records in form A and display result in Form B

    There are many ways to do this but here's what I'd probably do. Create a public variable on the main form and then reference it from your subform. Public plTaskCount As Long On your main form's On_Current event you'll need code like this: plTaskCount = Me!TaskCount 'Whatever your field name is...
  11. H

    New error on open of database

    Yeah, I too compile every few minutes. Sometimes every few seconds. It's a habit just like Ctrl+S. I recommend the same to you.
  12. H

    Select Statement Help

    Couple things. I wouldn't name my variable strLoginName if it's a number field and not a name. Suggest you rename it to something like: intUserID, lngUserID, intLoginID, lngLoginID Also, it's a bad practice to name your variable "name". "name" is a reserved keyword. Try to use sName or strName...
  13. H

    Bind query to subform

    A datasheet form is your answer but I'm not understanding this line: "the rows or row counts show in the data-sheet, but none of the fields are present. So I can see a row, but no fields." Will you have some fields on the main form and some on the subform? Are they two different tables linked...
  14. H

    Select Statement Help

    Here's the DLookup code: Dim sName As String sName = Nz(DLookup("UserID", "Tbl-Users", "HCAUserID = '" & Strloginname & "'"), "") MsgBox sName
  15. H

    Here is a Users And User Groups Example Database

    OK, I've uploaded a new version of the example that now should work in Access 2002/2003. I didn't test it in either one so I don't know for sure. As already mentioned, the difference is that this version uses global variables instead of TempVars. TempVars are much better because they will...
  16. H

    Here is a Users And User Groups Example Database

    Yeah, you are right.
  17. H

    Limited on number of import files

    Have you tested to make sure that your file selection box is actually handing back more than 36 files? I would test it in this code: 'Find the position of the first tab. tabPos = InStr(1, excelFiles, Chr(9)) 'If no tabs then only one file exists If tabPos = 0 Then lastFile = 1 tabPos =...
  18. H

    Multiple Values in one field - DB due asap

    I suspect you mean fields or columns when you say "FIVE DIFFERENT ROWS". Storing the serial numbers in a separate table that's linked to your items table is the best way to do this. It isn't that difficult to implement either. However, if you prefer to go the simple router you can just make one...
  19. H

    Limited on number of import files

    I don't see any import code, or anything that actually opens or closes the file for that matter. It appears you are getting a handle to the application. Are you telling the Excel application to load or open *.xls? I'm think it's possible that Excel does have a limit as to how many files it...
  20. H

    Limited on number of import files

    So how do you select them? Did you build something to view and select these files? Wheres your code that performs the import? Is it a loop? Do the files get close or unloaded after the import? You're using VBA to do the import, right?
Back
Top Bottom