Search results

  1. A

    .value

    I have a Query1 with records that may or may not have a value in the property "OrdreID". The most sensible would be to open the report if all of them had the same OrdreID. If they dont have the same or if some of them doesnt have a value or if none of them have a value, i would like to make them...
  2. A

    Nz in a controll

    =Nz(DLookUp("[Mottaker]";"Mottaker";"[MottakerID] =" & DLookUp("[MottakerID]";"Lagerdata";"[Malernr] = " & [Malernr]))) I tried first without the Nz, but i get #Error in the controll when The Malernr doesnt have any MottakerID. So the Dlookup inside the forst DLookup doesnt return anything. I...
  3. A

    refering to a controll in another form.

    Forms!AddNew!Tpe.Requery Forms!Mainsearch!Tpe.Requery Tpe are combos in both Addnew and mainsearch. there is no form-subform relationship here. This should be right according to this. http://www.mvps.org/access/forms/frm0031.htm I get "cannot find Form Addnew as reffered...
  4. A

    An easy way to find a number in a table.

    I want a code that just test whether a given number allready excist in a field or not. Lets say i'm adding one element, i want to know if it's there allready. I can use DCount to count all the elements in the table with my number in the criteria and test if DCount is > 0, but for the future...
  5. A

    SQL query

    strSql = "INSERT INTO Masterinfo (Masternr, Masterkode, Målartype, Betegnelse, Fabrikat, Spenning, Pris, Fase) VALUES (" & Me.Masternr & ", " & "'" + Nz(Me.Masterkode, "Null") + "'" & ", '" & Me.Mtype & "', " & "'" + Nz(Me.Betegnelse, "") + "'" & ", " & "'" + Nz(Me.Fabrikat, "") + "'" & ", " &...
  6. A

    scrolling through continous forms.

    I dont know what its called excactly, but you know the sliding/scrolling thing on the right side. I have a continous form with a header. The scroller appears so if the header would be scrolled away when you scroll down the records. I would like the top of the scroller start at the top of the...
  7. A

    Do Until

    I have a Do Until which i use for adding elements with primary key from number a to number b in a table. A problem is that if some of the numbers allready excist in the table, it wont add them. There is no error with it, but it just dont do anything with the numbers that are allready there...
  8. A

    coloring forms

    I have a form-subform case where i have the form to type in search-criterias and a subform that show results. I want to make a visual clear distintion between the form and the subform. I guess i could find out ways to color the grey background, but i believe some of you know the best way to do...
  9. A

    Can a button not set itself to visible not true?

    As the question in the title. I click a button, and if i answer yes in the following msgbox, i want something to happen, pluss the visibility of the very button i clicked to be false. I get the message that i cant set a button thats in focus to not visible.
  10. A

    locking a form

    I have a database with several forms, and you can go from one form, to all the other forms by clicking buttons. I wonder if there is any possibility as to lock a form when it is opened. Lets say i have a form A, and a form B, C and D. You can get to form B, C and D from form A by clicking...
  11. A

    Deleting from a table that is displayd in form

    I have a recordset shown in continous forms. The Recordset is based on a table. I want a delete-button to be able to delete that record. I do an sql query, but it doesnt work. It makes sense since the form allready displayd would have to change. But it doesnt do anything.
  12. A

    Requery a form

    I have a form which i would like to requery from anywhere. I do an update on the forms recordsource, but when i open the form, the last update is not on there. I have to close the whole database and open it, then it's there. Cant i just go "Forms!FormName.Requery from anywhere? i try in...
  13. A

    Whats wrong here?

    Private Sub Kommando23_Click() Dim strSql As String Dim A As Variant Dim B As Variant Dim C As Variant LevNavn = Me.LevNavn LevAtt = Me.LevAtt LevAdr = Me.LevAdr LevSted = Me.LevSted FakNavn = Me.FakNavn FakAtt = Me.FakAtt FakAdr = Me.FakAdr FakSted = Me.FakSted Kommentar = Me.Kommentar C =...
  14. A

    Open a form from two different forms.

    I have a form i want displayd when clicking a button in two different forms. I have Form A, B and C. I want there to be a button in both Form A and B that both opens the Form C. But heres the thing. I want the C to difference between being opened from A and B. If i open it from A, i want...
  15. A

    stopping the code

    I have a fairly long if-code. some places in that if, a form should open If Something Then DoCmd.OpenForm End If The thing is, depending of what i do in the new form that i open, i would continue the code, or not. Not continue that if, that wouldnt make sense, but i have something that...
  16. A

    DLookup in report

    Cant i use DLookup from a table that is not the recordsource of the report? I want to DLookup("[Field in another report]", "AnotherReport", Field = " A field in my recordsource)
  17. A

    Using Dlookup in a report.

    Why doesnt this work? =DLookUp("[Masternr]";"Masterinfo";"Masterinfo.Masternr = " & [Masternr]) cant i look up values from other tables in a report? Masternr is both a field in my recordsource, and a filed in the table Masterinfo, which is not in the recordsource. What is wrong here?
  18. A

    Using DCount/Dlookup

    I have a query, where i have a Field A that is the primary key. Field B is not primary, I can have, lets say 70 records. Field B can contain only 2-3 different values. What i want to do here is to make a report, where the lines is not every record, but every different value of B and the number...
  19. A

    Recordsource

    How can i make two tables my recordsource? what do i write in the recordsource-property? The tables are linked.
  20. A

    setting general variables

    Lets say i have variables that i want to be stored after i click buttons. So i cant declare them in the click of the button. I want the variables to excist from the start, and i am able to change them and get value from them when i click buttons. The point is that i dont want to use a table for...
Top Bottom