Search results

  1. H

    Loop stops halfway #2 while trying to save pdf

    :banghead: duh. Sorry, I guess that was pretty obvious :( Thats what you get when someone asks to change something you made ages ago... Well, at least you made some teachers pretty happy :) You are right about the debugging, I'll take a better look myself next time, its just that I am a little...
  2. H

    Loop stops halfway #2 while trying to save pdf

    I made the following vba command to save a pdf for every student in a particular group. However, when executing the code the loop stops halfway the second iteration and I'm not sure why. I added some debugging msgboxes and it dies the second time it gets to DoCmd.OutputTo acReport, stRap, "PDF...
  3. H

    Listbox filter not returning empty values

    Thank you JHB, that does work, but now when results are filtered all records with Null values show up as well :p I tried something with Nz() before but I guess I eh, well tried to compare the filters to null instead of the value because it works now :o Thanks for helping me think again...
  4. H

    Listbox filter not returning empty values

    Hello everyone, I have a form in which users can enter data in several textboxes to filter the listbox below it, this works great except for the fact that when a record lacks certain data it doesn't show up Basicly there are 4 filters, one for the name/id which works great, as the entries...
  5. H

    INSERT with optional fields

    I tried to catch it there, but the error was given even before the (bound) form would close, in fact as soon as the field in question lost focus it fired this error. This was solved by setting the allow ZLS to yes and then catching it on beforeUpdate I kinda figured it would be Null when a...
  6. H

    INSERT with optional fields

    This works! So simple yet so brilliant :D Now I can incercept zero length strings on unload/button click without access bothering me! Ah yes sorry, I mixed up, my original example was about students but I already solved that by making it unbound, so I used another example in my third post which...
  7. H

    INSERT with optional fields

    Hm? I don't really understand, why would you assume it is not required? I allow users to edit the data they entered, but there needs to be a certain minimum of information for the record to be usefull, thus the code (PK) is required. I could change it to have an autoincrement PK and make the...
  8. H

    INSERT with optional fields

    Ok thanks, always good to know, going to add some checking code to some beforeUpdates! My main problem however was that when a required field is left empty it fires a "You must enter a value in the ... field" and I'm having issues with catching it. Catching runtime errors works great (like when...
  9. H

    INSERT with optional fields

    I...hadn't actually tried using and empty variable as I simply assumed it would give an error, thanks :o
  10. H

    INSERT with optional fields

    Hello, I currently have a bound form that adds a new student, however, I've decided I don't like bound forms as weird stuff can happen (like when the user exits in another way than I anticipated) so I'm making an unbound form which will add the student when a button is clicked. I already have...
  11. H

    Filtering subform

    -EDIT- Solved - see first post
  12. H

    Filtering subform

    Thanks Eugin, I think I came across that site while googling before and its indeed very(!) usefull but I still get errors :P Following the matrix, I take the 'not in these forms' for filtering sub1 and get the following code: Forms!POP_Cijferinvoer!POP_CijferinvoerSUB.Form.Filter =...
  13. H

    Filtering subform

    I'm sorry, but I can't figure out how this is supposed to work even though there are tons of threads on this already :banghead: I have a NAV form where someone can select 3 values from comboboxes. By clicking a button (which checks if all values have been filled) you open up a triple layered...
  14. H

    Hiding duplicate fields in form

    You are right Jdraw, this would solve my problem, but it woud also require more user actions per edit than the current system, something I wish to keep to a minimum. After all thats why I'm building this thing in the first place ;) Everything works fine already, its just that I find it ugly to...
  15. H

    Hiding duplicate fields in form

    Thank you Gizmo, maybe I don't understand you correctly but I don't believe I have duplicate -records-. I'll explain better, I have a form which shows a [Student]s information with a subform that shows all his [Result]s. These [Result]s are coupled to a [Test] which is coupled to a [Subject]...
  16. H

    Hiding duplicate fields in form

    Hello again, I am trying to hide duplicate fields in a continues form (like it does in reports) but could not find a proper way to do this so I figured I'd code it in. I created an unbound [tbVakfilter] which is empty, then run a loop that checks the field [tbVakcode] against it and if it is...
  17. H

    How to check for already existing records

    Thanks Peter, smart to simply count any matches :) Here's the final code I used (in case people with similiar issues ever find this thread) Private Sub btnToetsen_Click() Dim insertSQL As String Dim toetsQuery As String Dim toetsCode As String Dim studentindex As Integer Dim opleidingid As...
  18. H

    How to check for already existing records

    Hello, I have a database where teachers can create new tests with the click of a button so I need a dynamic way to add new results for the students. To do this I made the following button: Private Sub btnToetsen_Click() Dim sSQL As String Dim toetsQuery As String Dim studentindex As Integer...
  19. H

    Question populating database dynamicly

    Thank you jdraw, however I don't think my database design is the issue at the moment but reading up a bit on database design never hurts ;) I've found out what I need to do, however I could use some help in the coding department. This query gets me the information I need, namely all tests...
  20. H

    Question populating database dynamicly

    Hello David, thank you for you reply, I'll try to clarify the situation a bit: The tests are not based on a spreadsheet, users are able to create new [Test]s with buttons elsewhere and link this to a specific [Subject]. This subject is then linked to an [Education]. When a teacher wants to put...
Back
Top Bottom