Recent content by Ankarn

  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...
Back
Top Bottom