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 wOOdy-Soft 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 Greaser

  1. Greaser

    2 SQL statements into 1

    Worked like a charm. Thanks. Cheers, John
  2. Greaser

    2 SQL statements into 1

    Thanks for your help. workplanNo and workplanSectionNo are declared as Text (2 chars) in itsTbl. I get a "type mismatch" error message. When I remove the single quotes, I get a "Type mismatch in criteria expression" error message. Thanks again, Cheers, John
  3. Greaser

    Automatic Number Generator

    Hi, I am trying to write an automatic number generator for an issue tracking system. The number should look like this: 08-06-003 Where 08 represents the workplan section related to the issue. 06 represents the year during which the issue was created. 003 is the number of the issue in...
  4. Greaser

    2 SQL statements into 1

    Thanks Golom. I have one more question: In what context do I use the query? If I use DoCmd.RunSQL, the debugger will only let me use the UPDATE statement, not the SELECT statement. Also, Do I declare itsNo_3 as a string? Thanks again, John
  5. Greaser

    2 SQL statements into 1

    Hi, Is there a way to combine 2 SQL statements into 1? Query1: SELECT itsTbl.itsNo, itsTbl.workplanNo, itsTbl.workplanSectionNo FROM itsTbl WHERE (((itsTbl.workplanNo)=[Forms]![itsNewFrm]![workplanNoCombo]) AND ((itsTbl.workplanSectionNo)=[Forms]![itsNewFrm]![workplanSectionNoCombo])); Query2...
  6. Greaser

    Automatic Number Generator

    First query: itsNoCount1Qry SELECT itsTbl.itsNo, itsTbl.workplanNo, itsTbl.workplanSectionNo FROM itsTbl WHERE (((itsTbl.workplanNo)=[Forms]![itsNewFrm]![workplanNoCombo]) AND ((itsTbl.workplanSectionNo)=[Forms]![itsNewFrm]![workplanSectionNoCombo])); Second query (subform record source)...
  7. Greaser

    Automatic Number Generator

    Record source for subform is countNo_3Qry: itsNo_3: Max(Right([itsNo],3))+1 countNo_3Qry's source is another query that gets its criteria from the issue form 2 combo boxes: workplan criteria = issueFrm!workplanCombo workplanSection criteria = issueFrm!workplanSectionCombo The first...
  8. Greaser

    Automatic Number Generator

    As you suggested, I used Max instead of Count in the subform query: itsNo_3: Max(Right([itsNo],3))+1 The query works fine, but the subform still does not get updated. Is there a way to have the issue number generated after updating the workplanSectionCombobox (second combo box)? Thanks...
  9. Greaser

    Automatic Number Generator

    Hi, I am trying to write an automatic number generator for an issue tracking system. The number should look like this: 08-06-003 Where 08 represents the workplan section related to the issue. 06 represents the year during which the issue was created. 003 is the number of the issue in...
  10. Greaser

    Null Subreport Leaves Gaps in Report

    I set the report detail and report header sections Can Shrink to Yes. It worked like a charm. Thanks, John
  11. Greaser

    Null Subreport Leaves Gaps in Report

    Hi, How can I have a null sbureport not leave large gaps in a report? I have all fields CanGrow and CanShrink set to yes. When null, the subreport is invisible, but still takes room in the report. Thanks, John
  12. Greaser

    Open database from other database

    PHV's solution worked like a charm. Thanks guys. Cheers, John
  13. Greaser

    Open database from other database

    When I use the following code, I get an error message: Dim retval as Varient RetVal = Shell("C:\uoi\mra\mra.mdb", 1) Error message: "Invalid procedure call or arguement". John
  14. Greaser

    Open database from other database

    Hi Ed2020, Thanks for your reply. The database is an instance MS Access 2000. It is located on the same computer as the other database. Would the command line look something like this? Dim RetVal RetVal = Shell("C:\uoi\mra\mra.mdb", 1) Thanks again. Cheers, John
  15. Greaser

    Open database from other database

    Hi, How can I open a database from within another database? Do I use the OpenDatabase command or the Shell command? The 2 databases are independent from eachother. How do I use these commands efficiently? Thanks, John

Part and Inventory Search

Back
Top