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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Tronsliver

    Date

    I'm trying to find the number of years between two dates: The first date is a persons date of birth compared to todays date. I'm using the query grid in Access. The formula I've been wrestling with is this: Years Old = DateDiff("yyyy",[DOB],Date()) I would like the result to give number of...
  2. Tronsliver

    Sending contents of listbox to Excel

    What I'm hopeing to accomplish is to build a command button that sends the contents of the list box to Excel when selected?
  3. Tronsliver

    Sending contents of listbox to Excel

    Hopeing someone can assist. I would like to send the contents of a list box to Excel. Is this possible? If so, I sure would appreciate some assistance as to how. Thanks Roger
  4. Tronsliver

    Creating a DB instance

    I used the following code in Access 97 to open a RecordSet within a Function for follow-on processing. When I tried the same code in Access 2002 I get an error on line "Set rst". Can someone tell me if this is still a valid way to approach this. Public Function FindAuthStr(varx As String) Dim...
  5. Tronsliver

    Pulling out my hair!

    I have two tables: employee( employee-name, street, city) - PK employee-name manages(employee-name, manager-name) - FK employee name I need to find all employees in the DB who live in the same cities and on the same street as do their managers. Obviously managers are also employees so its...
  6. Tronsliver

    SQL problem ?

    I open it in a standard module. Reason being is I have 5 other forms that use the Sub. What is strange about this problem is the code below works. It is also accessed from another form module vai a sub call. It works even though the table field is defined as text and I have the argument defined...
  7. Tronsliver

    SQL problem ?

    lesPaul, OK it was a text field and I made the change but it still doesn't work. Am I using the "AND" operator correctly in the SQL statement (last line)
  8. Tronsliver

    SQL problem ?

    I have a query named qryVacantSlots with two fields: "orgstrPrNbr" and "strestrPosc" I also have a listbox named EfficiencyListBox. sqleff is defined as a global variable. The SQL statement I'm using to populate the listbox is embedded in a Public Sub Below. The call I'm...
  9. Tronsliver

    SQL & Listbox

    Jebry was so kind to help me with the following code I used for Rowsource in a listbox. However, I need to add another variable for seaching. The current variable it uses is "varx". I need to add an additional called "vary'. I was hoping someone could assist in properly formating...
  10. Tronsliver

    Column name in ListBox

    I thought I gave you one...did it not take..let me know and I'll give it to you again..:) thanks for color help I appreciate it!
  11. Tronsliver

    Column name in ListBox

    TLady works great thanks...is there a way to change the color of the names? I would like to have the headings a different color than the data under the headings?
  12. Tronsliver

    Column name in ListBox

    Tlady, Here is my code. How will the compiler know what field to look for in the query if I change the name? sql = "SELECT qryExcess.sidstrNAME_IND," sql = sql + " qryExcess.sidstrGR_ABBR_CODE, " sql = sql + " qryExcess.sidstrDUTY_POSN," sql = sql + &quot...
  13. Tronsliver

    Column name in ListBox

    I built a listbox and populated it by using Rowsource with and SQL statement. Is it possible to change the column names the query provides to the listbox via VB? If so could I request an example. Thanks
  14. Tronsliver

    LIstbox and SQL

    vbaJock, If I wanted to use a variable in place of the 643 what would the difference be in the format? Reason I ask is because this number is the criteria that will be used to filter the query.
  15. Tronsliver

    LIstbox and SQL

    vbaJock thanks for helping. I'm trying something else and I think it wil work if I can figure out the formating for extending SQL code over five lines. Here is what I have but I keep getting syntex errors. If you could give me some expert advice on this I think this thing will finally...
  16. Tronsliver

    LIstbox and SQL

    The compiler is interpeting it as a string and not a SQL statement. Something just isn't right with the format.
  17. Tronsliver

    LIstbox and SQL

    Yes I did it treated everything between the quotes as a "string" and inserted in the ist box that way.
  18. Tronsliver

    LIstbox and SQL

    vbaJock, This is how I approached it but I'm getting an syntex error: Me!ExcessListBox.RowSource = Select sidstrETS FROM qryExcess Where orgstrPrNbr = '650' sure would appreciate your expertise :) Thanks
  19. Tronsliver

    LIstbox and SQL

    I know it can be done via the property box but I need to do it from within a "procedure." I'll have multiple forms accessing it. For example I'm looking for something like this Me!ListBox.Rowsource = SQL statement
  20. Tronsliver

    LIstbox and SQL

    Is it possible to progmattically attach and SQL statement to Rowsouce? For example I would like the SQL statement to select five fields form a query and use this to populate the listbox. If so an example would be appreciated. Thanks

Part and Inventory Search

Back
Top