Search results

  1. G

    Queries based on listbox

    VbaInet - Thanks a lot! All sorted now, just out of interest what is the difference between entering the query direct into the row source box, as opposed to linking the query to the row source? Thanks, Mark
  2. G

    Queries based on listbox

    VbaInet - The code works great thanks, BUT only if I enter the studentID within the quotes - These combo boxes will be on a form titled 'OptionDetailFormBackupChoices' - Also on this form is a textbox called Student_ID_3. When I adjust the code, replacing "A764582" with " & me.Student_ID_3 & "...
  3. G

    Queries based on listbox

    Edit: Code slightly altered and now the syntax appears to be incorrect, but the desired results are not being returned. See code below: SELECT CourseID, Courses.CourseName, Courses.CourseCredits,Courses.CourseSemester FROM Courses WHERE Courses.CourseCredits = 10 AND Courses.CourseSemester = 2...
  4. G

    Queries based on listbox

    VbaInet - Thanks for that. Below is the code I have used. I have entered the student number now for the purposes of testing out the code but I will alter this afterwards. It doesn't appear to be working. SELECT CourseID,Courses.CourseName FROM Courses INNER JOIN Enrolments ON Courses.CourseID...
  5. G

    Queries based on listbox

    VbaInet - Yes I do have a CourseID Fields, it is the primary key.
  6. G

    Queries based on listbox

    VbaInet - Correct, it is for the current student. Can you help with this? Thanks, Mark
  7. G

    Queries based on listbox

    Hk1 - Thanks for the reply - I know what you mean about the logical controls, everything else on my DB is but until I get the code working etc it isn't yet worth changing the controls on the current form. I am having trouble uploading the file, I completely understand what your saying about how...
  8. G

    Queries based on listbox

    Hi guys, I have a multiple select list box (List112), in which students can choose up to 3 courses, out of a possible 8. I have a command button which validates the information using VBA to check that no 'bad' choices have been made. I then take the user to another access form, where they can...
  9. G

    Sql & vba

    Jdraw - Thanks for the reply - I think the two tables you would be interested in are 1) EnrolmentsSecondary and 2) Courses. EnrolmentsSecondary has two fields which both combine to create the primary key for this table; they are, StudentID and CourseID. In the courses Table, the Primary Key is...
  10. G

    Sql & vba

    I am trying to set up an SQL statement based on some VBA: I have set up an access form which has various combo boxes and text boxes - I have set up some VBA to record certain aspects of the data, which is below: StudentCourse = Combo_Show_Students.Value Creditsoncourse =...
  11. G

    Recordset using VBA

    I have had a look at the select property thing but do not know how to define something that is selected. As an example, the top row in list112 is 'Business Planning 1'. What should I put after if me.list112.selected = true then? Surely not: if me.list112.selected = true then...
  12. G

    Recordset using VBA

    Spikepl - I will have a go at having two columns then, one prerequisite, one antiprerequisite, or something like that! This is what the Courses Table now looks like: Course Name CourseID Prerequisite AntiPrerequisite I have put the name of prerequisite...
  13. G

    ConcatRelated

    RG - It is working great now thank you!
  14. G

    ConcatRelated

    RG - I am officially a moron! Thanks for alerting me to this, and cheers for the help!
  15. G

    ConcatRelated

    I'll be honest RG - What you have just said has gone right over my head! I haven't set up a function in VBA - All I have done is put that piece of code into the control source text box on a form! I can't be much more technical than that I am afraid!
  16. G

    ConcatRelated

    Hmmm, I have doubled checked all the spelling and everything is fine. I have also made sure there is an = sign before the expression in the control source property box which can also be a cause of the error, but still getting the same error :(
  17. G

    ConcatRelated

    I added the bracket which I missed out for some reason, and this does not seem to make a difference. The result of the text box is #Name? StudentID is a text field if that helps. Thanks, Mark
  18. G

    ConcatRelated

    RuralGuy - Thanks for the quick reply, I have already visited this site, and the example on the site is the one I modelled my piece of code on, which appears to be incorrect so somewhere I have made a mistake with syntax or something, because nothing is appearing in the text box. As far as I...
  19. G

    ConcatRelated

    Good Afternoon, I have a group of related records which I would like to concatenate into one string - The sample data is below: StudentID CourseID B787878 BSB070 B787878 BSC880 B787878 BSD808 And the desired outcome would be: B787878...
  20. G

    Recordset using VBA

    Spikepl - Please see below me SQL: SELECT Courses.CourseName, Courses.CourseCredits, Courses.CourseSemester FROM Courses WHERE (((Courses.CourseSemester)=2) AND ((Courses.Prerequisite) Not In ("list112"))); This does not appear to be working! Any ideas?! Thanks, Mark
Back
Top Bottom