Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by MattLongmuir

  1. MattLongmuir

    Populating field with unbound text box

    MakeItSo: Thanks mate! Before i read your post i figured it out myself, by writing it like so: "...DMax('" & [TraineeID] & "', '" &tblTrainee & "')+1, '" & Me!txtfname & "')" Little bit more long-winded, but it gets the job done. Anyway, i went on to...
  2. MattLongmuir

    Populating field with unbound text box

    lol, you won't believe this. Before i read your post, i put the TraineeID field back in, and it now works! What the?! Anyway, i put your code in, just to be on the safe side. I got this compile error: Expected: end of statement [TraineeID] is highlighted I tihnk there might be missing...
  3. MattLongmuir

    Populating field with unbound text box

    MakeItSo: Thanks for the file. On loading it, it came up with a message saying the VBA project in the db as corrupt. Suffice to say, all the code was gone. lol - will my troubles never end? However, i know what the problem is now. I believe the problem to be my autonumber field (TraineeID) in...
  4. MattLongmuir

    Populating field with unbound text box

    MakeitSo: Yes, i have the table closed, then i open the form, enter a name, click the add button. Then i close the form and open the table - nothing is there. If it works on your machine, would you be able to send me your demo? My email is: mlongmuir@hotmail.com It would be greatly appreciated!
  5. MattLongmuir

    Populating field with unbound text box

    If it helps, i'm running MS Access 2002 and i have not changed any of my libraries (i.e. i've havnet included the DAO libraries or anything...not sure if this would affect my results).
  6. MattLongmuir

    Populating field with unbound text box

    Makeitso: You wouldn't believe it, but i'm getting the same error again..and wowzers, you've already answered it...uh oh. No go. I don't get any errors, but nothing is added to the table. Here's my code atm. You're obviously whipping up a quick test using the info i've provided, perhaps you...
  7. MattLongmuir

    Populating field with unbound text box

    MakeItSo: Thanks for the reply mate! Make sense what you said, however, i've run into a nothing problem. I made the changes you wrote, but not i get this error: Run-time error '3134': Syntax error in INSERT INTO statement. Highlighted code is: "DoCmd.RunSQL sSql" Here's my code...
  8. MattLongmuir

    Populating field with unbound text box

    Hi Team, Sadly, i'm still going to be a complete newbie for another few weeks - so try not to laugh at my insanely easy questions! (haha!) Ok, here's the deal (basically): tblTrainee - FirstName (text field) - LastName (text field) frmAddTrainee - txtfname (unbound text box) - txtlname...
  9. MattLongmuir

    Populating a text field with selections from ListBox

    Ken, As soon as it reaches the line: "Rs.Update", i get this error, which i don't understand. "" Run-time error '3022': The changes you requested to the table were not successful because they would create duplicate valures in the index, primary key, or relationship...
  10. MattLongmuir

    Populating a text field with selections from ListBox

    Ok, i fixed that. Didn't realise Access2K uses ADO by default. So i've added the DAO libraries now. I'm having another problem though, but i'll have a little play around and see if i can resolve it. In the meantime, if you could send me that sample db, it'd be muchly appreciated. Email...
  11. MattLongmuir

    Populating a text field with selections from ListBox

    Hi Ken, Ok, i've implemented the code from that thread you sent me to. As i'm sure you'd expect, i've hit a snag - probably the first of a few. When i click the command button i get a compile error: User-defined type not defined. This line of code is highlighted: "Dim CurDB As...
  12. MattLongmuir

    Populating a text field with selections from ListBox

    Ken, I've had a look over that thread, and it looks to be exactly what i'm after! I'm a bit surprised my search didn't turn it up, but alls well that ends well - and i'm sure it will! I'll have a crack at converting it into my db tomorrow, when i'm back at work and post here to let you know...
  13. MattLongmuir

    Populating a text field with selections from ListBox

    Hi Team, Here's the setup for my Access2K DB: Courses (table) - CourseID (autonumber field) - CourseName (text field) Trainee (table) - CourseID (number; linked to CourseID in Course table) Add Trainee (form, based on Trainee table) - lbCourses (list box) Basically here, i type in the name...
  14. MattLongmuir

    Error when using Combo Box to add new reocrd

    Ah fixed that now and all is working. YAY! I had an error in the CaptilizeFirst module.
  15. MattLongmuir

    Error when using Combo Box to add new reocrd

    Nope, think i've figured that problem out. Now i'm getting an error on this line: Compile Error: Sub or Function not defined. hmmmmmmmm......

Part and Inventory Search

Back
Top