Search results

  1. W

    Unbound Combo Box Based on a Query

    On one of my forms, I have an unbound combo box based on a query. The query contains 6 columns. The 1st column is the "bound" column, but it is not seen by the user when the user clicks on the combo box. The user sees only the contents of Columns 2 through 6. After making a selection and...
  2. W

    Possible Circular Design Issue?

    Before I get too far into working on my "Funding Applications" database, I wanted to confirm if the E-R diagram contains a circular design problem. Description of the db: It's supposed to track Funding Applications for various Projects under the control of either a single Department or...
  3. W

    Individuals and Contractors Working on Jobs

    Seeking some feedback on the appropriate design of the tables in an E-R diagram. One table contains a list of jobs (tblJob). Attributes would be: JobID, JobName. Second table is the linking table between the jobs and the persons performing the jobs. (tblJobPerson). I was planning for this...
  4. W

    Sample Code for Exporting to Excel

    No responses from last week, so I'll try again. I'd like to export the contents of a recordset to an existing Excel file. Ideally, I'd like to open a connection to that Excel file and loop through the 1st recordset and copy its contents into a 2nd recordset linked to the Excel file. Does...
  5. W

    Appending to Existing Excel File from Recordset

    I'm spinning my wheels on this. Trying to copy a recordset into an existing excel file. Here's the code I have so far. Any suggestion? Private Sub cmdExport_Click() Dim conn As ADODB.Connection Dim conn2 As ADODB.Connection Dim rst As New ADODB.Recordset Dim strSQL As...
  6. W

    Date Format: mm/dd/yyyy versus dd/mm/yyyy

    I'm using Date Picker to input a date on a form and I've just noticed something odd. The property sheet for this control shows the following format: mm/dd/yyyy I'm happy with that formatting and that is how the dates are ultimately stored in the table. BUT ... When selecting the date from...
  7. W

    Unsaved Record in Main Form

    I have two forms, the first of which I'll refer to as my "main" form. The main form has 6 text boxes bound to Table1. There is a one-to-many relationship between the records of Table1 and the Dates table. After filling out the first 2 text boxes of the main form, I want to open up a second...
  8. W

    Label Question

    I would like the label for a text box to read "B&W or Color" for a database of photographs. Access will not accept the ampersand. Since this is just a label, I thought I could get away with using this symbol. Is there a way to get the label to accept the ampersand?
  9. W

    Subform with Date Picker

    On my main form, I have a subform to input multiple dates, using date picker. I also have a text box on the main form to input single dates, again using Date Picker. On entering both the single date text box and the subform, I don't want the (default) date to be visible. I only want the...
  10. W

    Date Picker Default Question

    I'm using a form to populate a table called tblPhotoAlbums. Fields are: PKid Photographer (id from another table) Volume Date On the form, I'm using Date Picker, but I hate having to backtrack several years (even decades). I'd like the Date Picker to default to a particular year and month -...
  11. W

    Combo Box Question

    I have a simple db with 2 tables. First table has 3 fields: GroupID, GroupName, GroupNumber I want to populate the second table using a form. On that form are two combo boxes. Users can select a GroupName when they click on the first combo box. No problems there. But for the second combo...
  12. W

    Inputbox Prompt & Incorrect Responses

    I am using an Inputbox in a Function. The user is supposed to enter a number between zero and some other (positive) number. I want to check to ensure that the response falls within this range. If the user keys in a number outside the range, I want to show a message, but I do NOT want to...
  13. W

    Contents of Array, MsgBox and Looping

    I'd like to use Msgbox to list the elements of an array, with each element listed below the previous one until all the elements appear within the MsgBox. I imagine I would need to use Chr(13). Is it possible to use some sort of Do Loop within the coding for a MsgBox? PS #1. The number of...
  14. W

    Copying Some Elements from One Array to Another

    I am trying to copy the contents of an array [sNames] into another one [sNames2], but only if the element is NOT EQUAL to " ". My current code is: ==================================== Dim i, j As Integer j = 0 For i = LBound(sNames) To UBound(sNames) If sNames(i) <> " " Then...
  15. W

    Using Between with Like & *

    I have a form which feeds a query with a start date and an end date. In Query design, I use Between to limit the range of records to the requested date range. If the user chooses NOT to fill in the 2 dates text boxes on the form, can I use Like & * together with my Between criteria in the...
  16. W

    Rnd Function and Validation Check on Form

    I'm trying to generate a random number for a text box and then check to ensure that the generated number does not already exist in the table. I have attached a very small file (using ACCESS 2007). The range of generated numbers is very small (1 to 8) to keep the test manageable. I used the...
  17. W

    BeforeUpdate Vailidation for a Date

    I have a validation check in the BeforeUpdate event for a textbox on a form. (It's a bound textbox used to fill in dates.) I am using Cancel = True to keep the focus on the textbox used for inputting dates. QUESTION: Is there a way for the previous date to be cleared? (FYI, I'm using ACCESS...
  18. W

    Changing Field of a Previously Saved Record

    The SAVE button on one of my Forms does a validation check before saving the contents of 3 unbound text boxes. When there is already a record in the table with values identical to the contents of the first 2 text boxes, I use a Msgbox to ask the user if he/she wants to replace the value of the...
  19. W

    Row Source for Combo Box

    I have 2 unbound combo boxes on a form. The row source for the 2nd combo box is based on a query, using SQL code. I'd like the SQL query for the 2nd combo box to change - depending on the selection made for the 1st combo box. So, is it possible to use some sort of If statement in the row...
  20. W

    VBA Code Changing Text Box Name

    This might be something for the Forms discussion board. But it also involves VBA coding. I have 3 bound text boxes which I have placed in the footer section of a form. The footer section is invisible to the form user. The user enters data into 3 unbound text boxes which are visible and...
Top Bottom