User Profile

Collapse

Profile Sidebar

Collapse
Twanne
Twanne
Last Activity: Oct 24 '08, 07:21 AM
Joined: Jul 18 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Twanne
    replied to Certain records get skipped?!
    Hehe,

    Ok, I know it is kind of lazy to let other people do my work :p. The problem is that I've been searching on this function for a couple of hours now.

    Secondly, I'm not a school kid (just graduated :D) but i'm working on this project for a hospital where I did my internship.

    Third, because I'm working in a hospital it ain't that easy to let data out (secrecy of data, you know ;))

    And...
    See more | Go to post

    Leave a comment:


  • Twanne
    started a topic Certain records get skipped?!

    Certain records get skipped?!

    Hi

    I wrote this function:

    [CODE=vb]Function UpdateLongfunct ieFEVFVC()
    Set db = CurrentDb
    Dim percfev As Double
    Dim percfvc As Double
    Set rst = db.OpenRecordse t("SELECT eadnr, datum, fev1, fvc, lengte FROM Longfunctie;")

    Do Until rst.EOF
    percfvc = 0
    percfev = 0
    If (rst.Fields(4). Value <> Null...
    See more | Go to post

  • Twanne
    replied to Format Date in Access 2007?
    I do --> get someone who can read english :D

    Sry to be so abrupt but Mc is right. Just replace the property value to whatever you want. (dd/mm/yyyy)

    If you are having trouble because it isn't inserted right, use the function DateSerial(year ,month,day). It places a date in any sort of date field in the correct order.

    Greetz
    Twanne

    Über, über, upper sounds better.
    See more | Go to post

    Leave a comment:


  • Twanne
    replied to Text to Date conversion
    DateSerial(Left (eersteZendtijd ,4),Mid(eersteZ endtijd,6,2),Mi d(eersteZendtij d,9,2)) as eersteZendtijd

    Well this is the function DateSerial( year, month, day)
    The value of the field eersteZendtijd is constant yyyy-mm-dd.
    So I use Left to get the year from the field (four first characters), Mid to get the month and the day (Mid(Field ,Startposition ,Length to get ).

    The function DateSerial makes sure my dates...
    See more | Go to post

    Leave a comment:


  • Twanne
    started a topic I need some help with a query

    I need some help with a query

    Hi, I've build this query in VBA so it was easy to use lots af variables. But for some reason I can't get it to work properly. I'm searching on this for the last 2 hours and i'm getting desperate.

    [CODE=vb] db.Execute ("INSERT INTO tmpOverzicht(ea dnr, naam, voornaam, geslacht, leeftijd, gewicht, lengte, BMI, fvc, fev) VALUES (" & rst.Fields(0).V alue & "," & cstr(rst.Fields (1).Value) &...
    See more | Go to post

  • Twanne
    replied to How to compare to an empty recordset
    Hi,

    I've tried tthat to, but it didn't work either. The problem is that the recordset is empty, not the record itself. So it is a recordset without records.

    I've searched some more on other sites :p and found that it is possible to check the recordset itself with the .EOF and .BOF parameters. If they are both true than there is no record in the recordset. I've only found it after some hours of searching.
    ...
    See more | Go to post

    Leave a comment:


  • Twanne
    started a topic How to compare to an empty recordset

    How to compare to an empty recordset

    Hi,

    I'm trying to get some values from one table to an other. Now I select all dates from one table and I search with them in another table. When there is a record found for that date it should perform a query. But when there is nog record foud for that date is return empty. How do I compare to that??

    My code for now:
    [CODE=vb]Set rst = db.OpenRecordse t("SELECT DISTINCT Datum FROM Longfunctie;")
    ...
    See more | Go to post

  • Twanne
    replied to Import from excell
    Owkay, never mind this. Apparently when you have something in a field you want to import from excell you cant let other (like plain text or in my case " - - ") values than the standard in the field. Access wil try to interpret this it's own way and screw up your data.

    Greetz
    Twanne

    Throw the apple far enough.
    See more | Go to post

    Leave a comment:


  • Twanne
    started a topic Import from excell

    Import from excell

    Hi,

    I've got these files in excell that need to be imported to access. Now I've got one file, and when I try to import it, it acts weird. There are two fields in the excell fiile (Start, Stop) that are dates. When I have done my import the dates change to some number for some reason. 19/02/2007 changes into 39132. I've got an idea why it is done (dates are stored as long in access) but I got no idea how to get around this. This only...
    See more | Go to post

  • Hi,

    Yeah you could do that to but then you have to code it. If you just have a query (or table) with the input for the form, you don't need to use code. This keeps it more simple to maintain because you know your forms have those options turned of. No need to search your code for some line you might have set to true (or false) when it wasn't needed.

    Or you could write a function so that every form that needs this, calls...
    See more | Go to post

    Leave a comment:


  • Hi,

    Use the properties of the form. There are three or four options that you can set to yes or no to display the navigation keys. Just set them to no and they shouldn't be displayed any more.

    Greetz
    Twanne

    Hard to make faces in the corner.
    See more | Go to post

    Leave a comment:


  • Twanne
    replied to How to use NOT Operator in Queries
    Hi,

    I think this might be a solution to your problem:

    SELECT * FROM dtlsuggestions WHERE title = "Physics" AND NOT author = "david";

    This is the solution I think. If the title is longer than just physics you better use "like" to select the title.

    Greetz
    Twanne

    Keeping the keys clean.
    See more | Go to post

    Leave a comment:


  • Twanne
    replied to Text to Date conversion
    I've found the solution.

    Code:
    INSERT INTO Aerosol ( dkey, eadnr, eersteZendtijd, VerslagNr, cnr, TypeToestel, Hulpstuk, Medicatie, Frequentie, Onderhoud, Start, Stop )
    SELECT dkey, eadnr,[B]DateSerial(Left(eersteZendtijd,4),Mid(eersteZendtijd,6,2),Mid(eersteZendtijd,9,2)) as eersteZendtijd[/B], VerslagNr, cnr, [Type Toestel], Hulpstuk, Medicatie, Frequentie, Onderhoud, Start, einde
    FROM ExportAerosol
    WHERE omit="i";
    ...
    See more | Go to post

    Leave a comment:


  • Twanne
    started a topic Text to Date conversion

    Text to Date conversion

    Hi I've got this query:
    Code:
    INSERT INTO Aerosol ( dkey, eadnr, eersteZendtijd, VerslagNr, cnr, TypeToestel, Hulpstuk, Medicatie, Frequentie, Onderhoud, Start, Stop )
    SELECT dkey, eadnr, eersteZendtijd, VerslagNr, cnr, [Type Toestel], Hulpstuk, Medicatie, Frequentie, Onderhoud, Start, einde
    FROM ExportAerosol
    WHERE omit="i";
    In this query the field eersteZendtijd is selected from a table where...
    See more | Go to post

  • Twanne
    replied to syntax...
    Hey,

    The var you use, of witch type is it? Because if you use a var of the type form you can just use <varname>.Filte r to add your filter. Just build a function like Function age(f As Form) As Form and you can give your form to your function and it should return a form with a filter.

    Greetz

    Twanne

    I don't like things that aren't things
    See more | Go to post

    Leave a comment:


  • Twanne
    replied to Convert Text To Date
    Ok, so far I've tried CVDate(), CDate(), Dateformat(), Datevalue(),... some other to, But nothing seems to work.

    My query looks like this:

    Code:
    INSERT INTO Behandelingen ( dkey, eadnr, [B]eersteZendtijd[/B], cnr, verslagNr, klasse, behandeling, vorm, route, dosis, aantalKeer, per, start, stop, opmerking, onderhoud )
    SELECT ExportBehandelingen.dkey, ExportBehandelingen.eadnr, [B](CDate(ExportBehandelingen.eersteZendtijd)) AS[/]
    ...
    See more | Go to post

    Leave a comment:


  • Twanne
    replied to Convert Text To Date
    Hey,
    I've let it rest for a while but i'm back now :)

    The format for this as always the same indeed (2006-10-03 09:26:00.0). But the thing is I get some data from a centralized db send to me in excell. The centralized system uses this type of dates. Now I can import the date's from excell to access using the import worksheet function (or somthing in that trend) and that works. But, like it should be, it puts the dates in text...
    See more | Go to post

    Leave a comment:


  • Twanne
    replied to Using a query for a standard value
    Sorry to break down your solution (it probably works but I don't know exactly how), but it doesn't work here.

    Btw. I'm talking about when you right click on a field, then select properties (I think, my access is in dutch), there is a field to specify your default value. DMin("dkey","whatever my table name is") doesn't work there.

    Greetz

    Twanne

    Hit the floor at 300 Mph...
    See more | Go to post

    Leave a comment:


  • Twanne
    replied to Using a query for a standard value
    Ok, thanks for all the response :p

    Found a solution but it is a bit rude:

    When you open the form, you can ad a procedure on load. In this procedure I say what the default value for the field is. I had hoped it wouldn't be necessary to write it in vba because I know it is possible from within acces itself.

    Didn't find it but if anyone knows the answer I'd like to know it because it closes down my application....
    See more | Go to post

    Leave a comment:


  • Twanne
    replied to Using a query for a standard value
    I could realy use some help here, the query returns exactly one record so it should work, no? Or is it because I select the field from the query itself?

    Greetz

    Twanne

    Trees are like wood...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...