Search results

  1. GolferGuy

    Launch a query in code and access fields

    If you want to access various fields, and records from a query, then use that query as a RecordSet within VBA. Lookup RecordSet in access VBA help for more in-depth information. If you have any questions after reading up on RecordSets, ask away!
  2. GolferGuy

    Incrementing Number Field

    this in the format property of an autonumber field seems to give what you are asking for: 0\/0 that is a zero, \, /, and another zero The "\" says to take the next character and put it there just as is. the last zero is really a place holder for the last number in the string of numbers.
  3. GolferGuy

    record source

    When I have something like what you are dealing with, that is a subform that is not directly tied to the main form, I put some hidden, Master fields on the main form that are filled in by actions within subform1. For example, with the main form having customer data, subform1 having order data...
  4. GolferGuy

    multiple headers

    But you don't want those column headers on the first page? Or are these column headers coming from a group header, and you want that group header to print at the top of subsequent pages while still in the group? If that is the request, then Access help has this info: RepeatSection Property...
  5. GolferGuy

    How to autocomplete a report field?

    Set the Control Source of the text box to be: =Left(FieldNameFromTableOrQuery & "---------------------------------------------", 50). Then be sure to rename the text box by putting "txt" in front of the text box name. The text box and the actual field name from the table (or query) can not be...
  6. GolferGuy

    Exporting Formatted Report to Excel

    LadyDi, If what management wants is a nice formated report for people to view, then a PDF document is a very nice way to go. If management wants it in Excel so people can make changes (why change a report???) then Excel it is. But a PDF is VERY easy to make, it is just the same as printing to...
  7. GolferGuy

    Unable to Format Textbox to currency in Report

    My first thought is that the Total Due field is actually a label. But probably not, so the next thought is a corupped text box. Create another text box and see if you can use the currency format for it. If so, use it and delete the one that does not want to do as you tell it.
  8. GolferGuy

    multiple headers

    Are you using Excel XP or Access XP? If you are using Access, I would think, but I have not tried it, that you could make your page header .Visible = False in design mode, then in the page footer OnFormat event, set the page header to .Visible = True. The page footer should happen after the...
  9. GolferGuy

    Down, then Across Multiple Column Report

    I would try to set the height of the sub-report object within the OnFormat event of the dtmAttend Header. I would divide the number of attendees by 3, then multiple that with the height of the sub-report rows (0.25"). Then multiply that by 1440, the number of "twips" in an inch. Access uses...
  10. GolferGuy

    Date range From Within Report

    I would recommend to have a form that allows the users to enter the dates for the report, then click a button to run the report. If that button includes a DoCmd.Close acReport, "rptYourReportName" before the DoCmd.OpenReport, then it will just basically be doing what looks to the user as a...
  11. GolferGuy

    Visible Headers' Subreports

    Copy the objects (labels?) from the report you are using as a subreport and paste them right above the subreport object on your main report. If you make that copy paste as a group, they will maintain their alignment. You might have to move them left or right, but they should have the correct...
  12. GolferGuy

    hiding Listbox column separators?

    Are you looking for something like this: 01/12/2007 test1 test1 15/02/2008 324234 324234 15/02/2008 simth 999 15/02/2008 asasas asasas or do you just want the lines to disappear? I don't see any way for the lines to disappear, but to list the three fields with a space or two between them...
  13. GolferGuy

    Looping through 2 recordsets

    rolaaus and beckyr, I have written a small utility that will take the SQL from a query and convert it into VBA code. You can within the SQL screen on the utility name variables within your VBA code, so the value from a variable can be inserted into the SQL string at run time. For example...
  14. GolferGuy

    Number Conversion

    No, I'm not trying to be funny, but I did find a Java function that would do it, and thought you might be able to follow it well enough to translate it into VBA.function roundDecimal(nNumber) { var tenToPower; var nDecimals = 6; var newNumber; var numPad = 0; var curDecimal; var...
  15. GolferGuy

    Problem to overcome

    Who ever has the database open from the LAN, is it in a shared mode at that time? Does the asp open the database itself in shared mode? Or is the default for the asp Exclusive?
  16. GolferGuy

    I don't understand a section of VBA with "requery" code

    There is a third alternative, which would be to use the CamelBack naming method where there are no spaces or any other non-alpha characters used, but the first letter of each word in the object name is capitalized. At that point, this name would be "NonProgrammableSupervisorUpdateQuery" for the...
  17. GolferGuy

    Auto populate with weekly date on Combo box

    This looked like a fun challeng, so here is the code. Function WeeksToSelect(TableName, DateFieldName) As String 'This routine will accept the table name and name of the date field. 'This routine will find the oldest date in the table, in the field named, and then return a string of weeks, '...
  18. GolferGuy

    Default Value not getting applied when saving to SQL Server

    Many people, or so I have been told, only use unbound forms when dealing with SQL Server data. I personally do not do this unbound stuff, but I have had to work on a database at a client's location that was written that way, all unbound fields. It does create a TON of extra coding and work...
  19. GolferGuy

    Auto populate with weekly date on Combo box

    so, you want the week to go from Feb 4, 2008 to Feb 8, 2007? I'm really thinking you want the week to show from Monday through Friday, and to start with the earliest date in some table. What dates do you want at the top of the list? The most current dates, or the oldest dates in the table? Do...
  20. GolferGuy

    Default Value not getting applied when saving to SQL Server

    Joanne, I just reread you original post. Sorry I missed this before. But, if my just previous suggestion doesn't work, this would be a work-around. Make the field on the form an unbound field, then in the after update event you can move the data from this unbound field into the bound field...
Back
Top Bottom