Search results

  1. A

    record just created...

    the table is called tblAccessLog and the ID field is just called ID.
  2. A

    record just created...

    I'd thought of the DLookup but didn't know how to get it to retrieve the ID of the record that had just been created. Is the DMax function to return the last value? Never heard of that one before?
  3. A

    record just created...

    I've got an SQL command creating a new record in a table with the ID as an auto number. Is there a way of returning the ID number of the record just created? Thanks
  4. A

    INSERT Sql problems

    DoCmd.RunSQL "INSERT INTO tblAccessLog " _ & "(User, DateLoggedIn, TimeLoggedIn) VALUES " _ & "(" & Username & "," & Date & ",#" & Time & "#);" That's the code i'm using at the moment which does work except for it asking me to input data still. I can't really use the...
  5. A

    INSERT Sql problems

    That sorta works, however it's not brining up a prompt box asking the user to enter something for the value which is actually the value of the username So for example, the username variable is set to Admin, it is asking you to enter data for Admin???? It's for a logging script to log the date...
  6. A

    Which Event?

    ah ok that makes sense. Works perfectly now. Thanks :D
  7. A

    INSERT Sql problems

    Ah ok fair enough. Well that seems to work for the Username and Date however it throws another error to do with the time, saying : "Syntax Error (Missing Operator) in query expression '16:41:12'."
  8. A

    INSERT Sql problems

    ah yea so i was sorry. my mess up. Ok now it works however it is asking me to type in each of the three values. Why isn't it just automatically getting them?
  9. A

    Which Event?

    hmm still not really working properly. Yea I want it to simply check the text in the text box after every stroke. I'm using the following code in the Key_Up event now. If InStr([txtSendTo], "@") <> 0 And InStr([txtSendTo], ".") <> 0 Then txtMessageSubject.Visible = True txtMessageText.Visible...
  10. A

    Which Event?

    Which Event do I need to use to check what the user is typing into a box as they are typing it? Have tried using a timer that is activated at a certain point, however it still only checks it once the user clicks out of the control. Thanks
  11. A

    INSERT Sql problems

    Trying to run an SQL command in the VBA to insert the current date and time into a table but I keep getting a syntax error? Any help? Thanks DoCmd.RunSQL "INSERT INTO tblAccessLog " _ & "User, DateLoggedIn, TimeLoggedIn) VALUES " _ & "(Username,Date,Time);" The...
  12. A

    Create Login Account

    Yea shouldn't be too much of a problem. Do you have a field in the table which states what type of user they are? Or which indicates whether the user is an admin? If so then you really just need an IF statement. Just put in a clause to check if the user that has just logged in is and admin. If...
  13. A

    Stop tab button changing records

    Ah always wondered what that property was. Worked perfectly, thanks :)
  14. A

    Stop tab button changing records

    How do you go about stopping the tab button from scrolling through records when it reaches the last field in the tab order?
  15. A

    Custom Reports Form

    Alright then, i'll take another look and see what I can do, cheers
  16. A

    select from list

    hmm firstly check the spelling of everything in there, must be identical to the form you're using the the actual name of the list box. Quick thought, what is the list box taking its values from? a table or have you just given it a list of values? If it's from a table it my be getting the ID...
  17. A

    select from list

    Don't put the ! between [stock] and [Supplier Colour], just a fullstop, but make sure you keep the ! between [Forms] and [Stock]
  18. A

    select from list

    In the query, in its criteria box, put something like the following, obviously adapting it to your system : [Forms]![Form Name Here].[List Box Name Here]
  19. A

    select from list

    Create a query to fetch the stock levels, and on the criteria of the colour, make it the value selected in the list box. :)
  20. A

    Custom Reports Form

    Ok I had a look at that link but it's only really for a flat file. How would I adapt it for a relational database? Couldn't really find anything on google for it :(
Back
Top Bottom