Search results

  1. B

    Using the IIF statement to sort

    Hi I have very basic SQL knowledge and would appreciate any help. I have a query which asks users to enter an ID - based on that ID, a Report is generated that gathers student information and produces a subject report for that student. The ID refers to a subject that a particular student is...
  2. B

    whats wrong with this code??? :(:(:(

    Hi guys its been ages snce i posted, and i am stuck again :( ive copied a bit of code down, can u tell me whats wrong with it? the error message i get is : Rub time error 3061, Too few parameters, expected 1 when i go to debug it it highlights this line: Set rstSSC =...
  3. B

    Writing from a Query to a Text Box

    Hi guys, Can anyone tell me how to write from a query to a textbox? Say I have a Query behind a button that outputs some data (String1, String2, String3) Then I have a few text boxes on a Form, that need to display the values retrived from the Query: So TextBox1 should display String1...
  4. B

    enabling textboxes

    HI - another question- im on fire tonight :) i have this situation in a form, where the user needs to click a command button which enables 4 TEXTboxes . The 4 textboxes are initially not enabled (so greyed out) then, if the user clicks YES, they all get enabled. Otherwise the user clicks no...
  5. B

    checkboxes

    Hi ppl, can someone tell me the correct syntax for saying: "If checkbox1 is selected" do blah Else blah... i read its meant to be somthing like If chk1.Value = 1 then blah but, my checkboxes do not bring up the Value property? Bella :confused:
  6. B

    blank textbox?

    Hi :) How do i say "If a the text value i get from a textbox is blank THEN DO whatever" in vb?? something like IF Me!txtLO1 = "" Then ... but this doesnt seem to be working?? Bella
  7. B

    multiple recordets in a sub

    Hi is it possible to declare and use multiple rescordsets inside one sub? eg. Dim rst1 As DAO.Recordset Dim rst2 As DAO.Recordset Dim sql1 As String Dim sql2 As String sql1 = blah sql2 = blah blah blah (some code) rst1.Update rst2.Update ? i tried this, but its not working...have i...
  8. B

    Global Variables in VB

    Hi, does anyone know how to declare and use global variables in VB? Eg, I have an integer variable called temp1 which i need to use in two different subs. - in sub1 when i use the variable, I assign an integer value to it - in sub 2 when i use the var iable i use its value in an SQL string...
  9. B

    What is wrong with this code? strings in VB

    HI, Can someone please tell me how to write the following in VB - using all the right syntax. I am using DAO and i cant make it work. I'm getting syntax errors :(:(:( "Insert into [table]" & _ "VALUES (w,x, y,z)" &_ Where: 1. x is a string that the user types into a text box on a form 2. y...
  10. B

    VB Syntax Question

    Hi, sorry for this very dumb question but: Cam some1 please tell me what the following operators refer to in VB, and how to use them. I am getting syntax errors so I must be doing something wrong. when do you use ' in an SQL expression? when do you use " in an SQL expression? When do you...
  11. B

    how to use a value from a combo box in a report

    Hi, can anyone tell me, if there's a way to put a value that a user selects from a combo box in a form into a report? EG. The report has a field called Names which it needs to get from a Combo box on a form that stores various values for Names (eg. Bella, Bob, Jane, etc) So, if the user...
  12. B

    wot is the ! operator referring to in VB?

    Hi, I've seen this syntax used in code samples, but I'm not very familliar with VB syntax, and I am wondering if the following means : IF a table (Table Name) has a field (Counter) and Counter contains a value of 3 Then strQueryName = "Report 3LO" Elseif blah blah... Is this wot this bit of...
  13. B

    how to return a value from a query to a variable?

    Hi Can anyone tell me if its possible to create an Access Query and then put one of the fields returned in that query into an Integer variable ? i want to say something like: SELECT x,y,z FROM X,Y,Z WHERE blah blah & blah; and then in VB code something like: Dim CounterVariable As Integer...
Back
Top Bottom