Search results

  1. B

    Change text yy.mm.dd to Date dd/mm/yyyy

    After having to take on the work of someone else and finding that the dates were stored as text in the format yy.mm.dd I would like to change it so it is dd/mm/yyyy and stored as a Date. I was thinking about using an update query rather than go through 10000 odd records! Any ideas?
  2. B

    Set data type of field

    I have a query to go through a table and pick up the amount of money earnt during a period then I use that field to calculate commission, but the commission field just shows up as numbers and not as currency as the set field in the table does. Is there anyway in SQL to say what sort of data type...
  3. B

    Tricky query

    I have an insurance policy database keeping track of insurance policy details for household and commercial shops and businesses. Tables I have are tblPolicyHousehold, tblPolicyCommercialS (Shop), tblPolicyCommercialB (Business). They each contain the following fields (the other fields they...
  4. B

    Sum a field in query

    I have two tables, Group and Person. A group can hold one or more persons, linked by a field called GroupID. And a person can be a leader of a group. I want to make a query to return the leaders of the group, which I can do, ie. where tblPerson.Leader = true, but I also want to calculate the...
  5. B

    hyperlinks in excel to access

    I have trying to export some cells in Excel which have hyperlinks in. I only want to export the path though and not the text which shows in the cell in Excel. Any ideas?
  6. B

    Potential recordset problem

    I have customers, projects and work tables. projects are linked to customer via customerid and work is linked to the project via projectid. Ok.. What I'm trying to do is make a timesheet so that work done for a specific date for any project can be retrieved and concatenated into a string or...
  7. B

    Catch a null primary key error

    Hey guys, Anyone know how to go about catching the "Index or primary key cannot contain a Null value." message box and perhaps showing a custom message instead? Thanks in advance, Bob
  8. B

    Reports form

    Generate SQL String through form values I am in the process of making a reports form for my client where they will be able to generate a query on the fly as it were. I have three radio buttons, All, Active and Inactive. So all will show both the active and inactive user accounts, active will...
  9. B

    Get directory path

    Anyone got any ideas how to get the directory path where the database is running? Thx in advance Bob
  10. B

    Log changes using Insert Into

    Basically my boss wants it so that all changes made by staff to the database are logged. Logging the username, datachanged, form the data was changed on, and the date and time... I made a public sub but it doesnt seem to be working, any ideas? I was thinking about putting it on the afterupdate...
  11. B

    Populating combobox with sorted table data

    I have a client table with a field called location. On a reports form that I have, I want to make a combobox for all of the locations, so it could show all the clients from a particular location and also it would reduce the errors due to someone spelling a place name wrong. I could set the...
  12. B

    Yet another keypress/input mask question for the forum

    Yea yea I know, another one... But the way I see is that I haven't asked them all so its ok... :p Right basically, I only want to allow input of Y N or P into a text field. I thought it would be best to do it with an onkeypress event as I know of no way to block certain characters in a text...
  13. B

    Tabs, subforms and no data!

    I have a form with two tabs... Its record source is Person and Account. The main tab has a load of fields relating to the person and the other tab is meant to show the bank accounts that the person has in a subform. However if there is no bank account for the person then nothing will show in...
  14. B

    Previous record fields

    Hi there, I'm trying to make a form which calculates the annual depreciation value of a property. I have tried using the PrevRecVal function and I even made the following query: SELECT Last(PropertyDepreciation.[Total]) FROM PropertyDepreciation WHERE...
  15. B

    Changing value of another form field

    OK heres the deal... I have a property form for keeping track of houses and buildings owned and then on that form i have a policy field for the policy number of the insurance called txtPolicy. Next to that field I have a little button which opens a form so it will show all the insurance policies...
  16. B

    Login form vbkeyEnter?

    I have a login form which works fine, but I would like it so that when the caret is in the password field that if the user presses Enter it will do the loginBtn_Click event. This is what I've tried so far... Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode =...
  17. B

    Text box question

    I have a text box i am using as a search text box. I have a search button which I want to only become enabled when there is text in the search text box. I have tried the following in the textbox on change event but to no avail. if searchBox.Value = "" then okBtn.enabled = false else...
  18. B

    Relationships with linked tables

    I have a database with a table on a shared network drive. The table contains a list of buildings, building details and a unique building code. I want to be able to use that database as a master copy so any new buildings that need to be added can be. I have another database with accounts and...
  19. B

    subform question

    I have a search form which displays the results in a subform (datasheet style). I want to be able to double click on a row in search results subform and another form load up and its data be retrieved based on the ID in the subform. But I cant figure out what to put in the VBA to get the current...
Back
Top Bottom