Search results

  1. N

    One line of code causing problem

    Can anyone help with this little bit of code. I have a module that exports data from Access to Excel. The following line is causing me problems. I am trying to divide a value on one sheet on the Excel book with a value on another sheet of the same workbook. oSheet.Cells(intRow, 2).Formula =...
  2. N

    Printing

    I am printing a report form a button on a form using:- DoCmd.OpenReport stDocName, acNormal However I cannot get the sort order right. i have tried setting the sort order in the reports properties and also the underlying query but to no avail. How can I force the sort order from the print...
  3. N

    Print problem

    I am printing a report form a button on a form using:- DoCmd.OpenReport stDocName, acNormal However I cannot get the sort order right. i have tried setting the sort order in the reports properties and also the underlying query but to no avail. How can I force the sort order from the print...
  4. N

    Open word specific page

    Anyone able to help. Can a command button be coded to open either a Word or PDF file at a specific page number? Any help really appreciated.
  5. N

    Security Advice

    Some advice would be appreciated. There seems to be a minefiled of papers, some conflicting, on Access security. I have a standalone access database which I need to protect. I do not want users getting access to anything other than whats on the switchboard. I have disabled the shift key bypass...
  6. N

    Disable problem

    The code to disable shift keys at start up that has been posted here numeroous times is causing me problems. I am a complete novice with vba. but i cannot seem to get it to work and there seems to be a problem with the following line of code:- db.Properties(strPropName) = varPropValue Can...
  7. N

    Delete Query

    I am trying to run the following sql but where there should be 54 records for deleting I keep getting 0 records will be deleted. I used an findunmatch query to establish tat there where 54 records unmatched. Can somen tell me whether the sql below is correct. I am Very new at this DELETE * FROM...
  8. N

    Dates problem

    I have 2 dates in a form, (First date & Last date already there when form opens), from which I want to display the difference in years, months & days. I have found several completely different methods for this on the net however I am still not getting it correct. The best I could find was some...
  9. N

    Append problem

    The code attached below is used to run 2 append queries from a form when a button is clicked. I have switched the warnings off and provided the user the chance to cancel the append after the button is clicked. However I would like to inform the user whether the record to be appended has infact...
  10. N

    Time/Decimal convert

    I have a query with 2 fields I wish to multiply together to get a value for a feild, [Hours_Lost]. One is a short time field and one is a number field. The short time field is [Hours] and the number field is [people] I have been trying the following but no luck. Abnyone any ideas? Hours_Lost...
  11. N

    Dates help

    I have a date field in a table that I store dates in UK format, (DD,MM,YYYY). I have aform with a command buttong that is supposed to open another form at a particualr record based on the date field. However if the day part of the date field is over 12 then no record is returned. For example...
  12. N

    Open Form

    I have a button on one form that when clicked is supposed to open another form. The form its supposed to open is based on a table with a composite key. Is it possible to get this bit of code to open the form based on 2 fields values? The wizard allows you one choice and as I know nothing abot...
  13. N

    Disable enable

    Is it possible to have a form button disabled until a condition is true with other field values. I have a button, (appendbtn), that I want disabled until 2 fields, (Day) and (DayCheck) are equal.
  14. N

    Unbound fields

    I have a form bound to a table that passes several parameters to a query. However there is one field within the form that is unbound that I would also like to pass to the query. I have been unsuccessful in doing it. I have tried to pass it the same way as the others i.e:- [Forms]![Form...
  15. N

    Is it an append problem, table problem or am I mad?

    I have a form with subform, containing data from 2 tables on a 1 to many relationship. I would like to append the data in the form and subform to 2 seperate tables. The destination tables each have primary keys, (autonumbers) along with the fields I wish to append from the original tables. Can...
  16. N

    Append Data

    I have a form with subform, containing data from 2 tables on a 1 to many relationship. I would like to append the data in the form and subform to 2 seperate tables. The destination tables each have primary keys, (autonumbers) along with the fields I wish to append from the original tables. Can...
  17. N

    Continuous form

    Is it possible, in a continuous form, to have the blank record, (next available record), to appear at the top of the records when opening the form.
  18. N

    Search criteria

    I have a button that when clicked on the form allows the user to type a surname and searc the database. however at present the full surname must be typed correctly. I would like for it to be able to search with only part of the surname being entered. How could I change the following code to...
  19. N

    Non-enabled form formatting

    I have a form with all fields enabled option set to No. The user must be allowed to click a delete button to delete a record but cannot edit or add records. Is it possible to prevent the fields from greying out in this situation. I have tried by enabling the fields and instead setting the forms...
  20. N

    Sort records

    I have a button on a form with the following code on click. This sorts the records in Ascending order. How would I modify the code to sort in Descending order. Private Sub SortName_Click() On Error GoTo Err_SortNameBtn_Click 'Sorts the records by Surname in Ascending order Me.OrderBy =...
Back
Top Bottom