Search results

  1. A

    .value

    Ah.. I understand. The problem is that Me!Results.Form.OrdreID.Value can be Null, so i have to rewrite my code. Thanks.
  2. A

    .value

    I know about the ]. ordre = DCount("*", "Query1", "[OrdreID] = " & Me!Results.Form.OrdreID.Value) Doesnt work either. Is the reason that DCount doesnt work here that Me!Results.Form.OrdreID.Value might be Null?
  3. A

    .value

    I found it easy to add OrdreID to the recordsource. The thing is that Query1 is displayd in a subform from the form where i have this code. But when i have OrdreID in the recordsource of a subform, shouldnt this work? ordre = DCount("*", "Query1", "[OrdreID = " &...
  4. A

    .value

    I discovered that. I am not opening this from a recordset. How do i count it from the Query1? I just want to find out whether 1. All the records have same OrdreID 2. All the records dont have the same OrdreID 3. None of the records have OrdreID Can i get this information from the query?
  5. 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...
  6. A

    SQL query

    I search for a given ordrenr, and i want to change it to another, when i do that, it will disappear from the form where i'm displaying it. I suspect it would take a lot of trickery. My Ordretable does have a PK. In my other table "Lagerdata" i have a lot of elements, and there several elements...
  7. 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...
  8. A

    SQL query

    ID is not the primary key. OrdreID is primary in the table Ordrer but not primary in the Query1, so it is ok to change it. It is serialnumbers that changes ordreID. But the new OrdreID isnt a field, so how do i implement that? I would have to build the Query1 from the start after i have...
  9. A

    SQL query

    Ah.. ok. So it will drop out. I dont want it to drop out, thats the thing. Because my form is displaying all the query1 records, and when i change it, i still want it to show. Query 1 is a table that changes all the time, so i just want it in there till the next search. Isn't it possible to...
  10. A

    An easy way to find a number in a table.

    i'm not so familiar with making functions to use. What is the deal with the "case"?
  11. A

    SQL query

    Can i ask you SQL wizards one more question? I have this SQL strSql = "UPDATE Query1 SET OrdreID = " & Me.NyOrdrenr & ", MottakerID = " & DLookup("[MottakerID]", "Mottaker", "Mottaker = '" & DLookup("[Mottaker]", "Ordrer", "OrdreID = " & Me.NyOrdrenr) & "'") & " WHERE Malernr = " &...
  12. A

    refering to a controll in another form.

    Yeah. I realized that after a while. If they should not be open i use "On Error Resume Next"
  13. A

    refering to a controll in another form.

    I believe my problem is that the forms i'm reffering to is not open. Does it have to be open?
  14. 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...
  15. A

    SQL query

    I am aware of the å. But its a norwegian letter and this is to be used for norwegian. I try to use those letters as little as possible. I didnt want to enter the string "Null". I know that doesnt make sense. I wanted to add Null. As i understand, + is to use if both sides has to be something...
  16. 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...
  17. A

    SQL query

    Thats the goodstuff. I was looking for something excactly like that. I didnt find a way to only include the ' ' if Me.Controll was not null. Ive spent so much time on this its ridiculeos. Thanks man.
  18. 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, "") + "'" & ", " &...
  19. A

    Do Until

    This is interesting. I was kind of wondering when in my process arrays would come up. I have written 1700 lines of code on my database now, never had the use for array i guess. But i remember from java that arrays was the big thing. When i know that its an array it makes sense. I dont think...
  20. A

    scrolling through continous forms.

    If i understand you correctly, you are talking about making a form into form and subform? I think that will be a bit much.
Back
Top Bottom