Search results

  1. M

    Dlookup - find an easier way

    I have succesfully written this code in the load event of my unbound main form. It works perfectly, and everyone of my textboxes shows the number from the query BeslagTotals. However, as I wrote in the previous post, I also have to be able to filter the results based on a selection in 2...
  2. M

    Dlookup - find an easier way

    I guess my big problem is that I dont understand the code you supplied good enogh. For example, do I put it in the forms load event? And how do i rewrite the code when i want the textboxes filtered on a combobox selection? For example if cbo1 is filtered on place, then i want all the textboxes...
  3. M

    Dlookup - find an easier way

    First off I really want to thank everyone for taking your time to help me, I really appreciate it. I am what you would call an amateur, and therefore some of my questions will probably be basic and stupid :) 1. Pat and Doc_Man: Is it possible to use your suggestion and show the data on 1 page...
  4. M

    Dlookup - find an easier way

    I will try this out, thanks. I have now made 13 different queries for each type. The queries all have a single record each showing "Type", "In", Out". The last two being a totals count using this expression: In: Sum(IIf(Utkvittert=False;1;0)) I have also made a totals query based on all the...
  5. M

    Dlookup - find an easier way

    Thank you Pat. I will try your solution first. I have made a query using the SQL code you gave. The query has 4 columns; Type, Sent, Out and Total. It looks good, but i dont understand how to get that information to show in different textboxes on a form. And further down the road, how to filter...
  6. M

    Dlookup - find an easier way

    How would you go about doing this?
  7. M

    Dlookup - find an easier way

    Hi all, My last obstacle before finishing a big database is getting the summary form correct. This is going to be a long post, but i need help to make my VBA code simpler (if possible). Right now it takes about 15 seconds to do all the DLookup`s. I have an unbound form (frmSummary). There are...
  8. M

    Access VBA, If - End if, what ends?

    Thanks for all your answers. I understand it perfectly now :)
  9. M

    Access VBA, If - End if, what ends?

    Hi, Probably an easy question, but I havent found any good answers to it. Say you have a code with several If statements. Something like this: If me.checkbox = true then If msgbox ("Do you want to continue", VbYesNo) = VbYes then docmd.openform "formB" else Cancel=true End if End if In...
  10. M

    Form OnCurrent event not firing - bug workaround

    Thanks JHB, putting the code in the AfterUpdate for the listbox worked. I feel stupid for not thinking of that myself.
  11. M

    Form OnCurrent event not firing - bug workaround

    Hello all, I have a problem with my forms OnCurrent event. It does not fire when I move to the first record. The problem lies with the AfterUpdate event for a listbox that is on the form. This problem have been argued on several forums, but i have not found an answer on how to go around this...
  12. M

    Help with SQL string in VBA

    Thanks Minty - your solution worked :)
  13. M

    Help with SQL string in VBA

    Hello all, I am writing av event in the NotInList event of a combobox. The combobox does a lookup in another table and returns the value to a textbox in my main form. The lookuptable is tblSvarTypeSporprøve. It has 3 columns: - ID - Type - Category Its purpose is to show the answer of...
  14. M

    Passing child_ID to new post in parent form

    Thank you Beetle. The code looks Great. Being a novice programmer i havent fully grasped the different event types and How to build all the syntaxes. But this forum is a Great place to learn. Thank you again. I cant wait to get to work on monday to test this out.
  15. M

    Passing child_ID to new post in parent form

    The item can only be stored in 1 place. But I want to be able to see the history of where it has been earlier. There is a separate table called tblLocation. The locations table is linked to the items table with an ItemID. I cant make the locations a subform because you view the registered items...
  16. M

    Passing child_ID to new post in parent form

    On the frmLocation i have the simpel code DoCmd.GoToRecord,, AcNewrec. I need to change this so i get a code where the ID in the related child table gets passed along from the existing record to the new one. I could not look at the sampel database because of restrictions on the work network. But...
  17. M

    Passing child_ID to new post in parent form

    I have Done all that. For my purposes i feel its a well designed database. But I am a novice programmer and I have to do some googling and asking when i dont know the answer. So there is no code that allows the child ID to be passed along when creating a new post in a related form?
  18. M

    Passing child_ID to new post in parent form

    I live in Scandinavia. The idea is that multiple users can access and use the databae at the same time. However the total number of users will be small, maybe 3-4 at the same time. It will not be a web-database. We have an internal network in the station. The database will not be used to...
  19. M

    Passing child_ID to new post in parent form

    Thanks for your Reply. I am working in the police and I am creating a database to keep track of different items seized in criminal cases. The database is basically a big list of seized items. The items table contains every single item with with some additional information. An item could be...
  20. M

    Passing child_ID to new post in parent form

    Hello all. Again I come here for help. I need some help writing, what I think, must be an easy code. I have a form "frmItems" listing every item in a shop. Connected to this form is "frmItemLocated" which tells where exactly each item is stored. The "tblItems" is the parent to...
Back
Top Bottom