Search results

  1. I

    add fields to table using combo box

    Mikedr, I'm not sure which direction you are going - adding a project manager to a project, or adding a project to a project manager. Let's that the first case Your project_file table has a field ID - I assume this is project_manager_ID and that file_num is the project key. If not, you need to...
  2. I

    change a value on a certain table but my form is based on a query

    dàz-öl, I assume that each employee belongs to only one department. If this is the case you shouldn't be keeping the number of computers on the department table, but getting that number by doing a query of the number of employees in a department with a computer.
  3. I

    displaying multiple fields in a report

    Create a new query in design view. Add the three tables. Click on the SONum in the first table and drag it over the SONum on the second table to create the link. Do the same with the third table. All are now linked. Drag the fields you want displayed to the design grid and VOILA. If it is...
  4. I

    Validating data on Calculated Control

    It should work as RV has suggested in his second point. Put your validation rule in QuantityRequested <[Balance].value - [xxx].value (or whatever)
  5. I

    Using the Selected property on a List Box

    I have a form with two List boxes. On selecting an item in one List Box, I execute a query and fill the contents of the second list box. This all works fine. What I want is that when I click on List1, List2 is filled and the first item of List2 is selected automatically and highlighted. I have...
  6. I

    Scale Printing to one page width

    jon, you have an option for report printing which may be applicable for what you are trying. stDocName = "rptClientSelect" DoCmd.OpenReport stDocName, acPreview, , prtSQL DoCmd.RunCommand acCmdZoom75 Check out help on the acCmdZoom and see if it has what you want.
  7. I

    Convert Numbers to words for Month

    JC, try the following month_word = CHOOSE(month_int,"January","February","March".........)
  8. I

    Clearing a record in a data entry form

    Pat, thanks for the tip re acSaveNo - I spent a fair bit of time on that recently and gave up in the end.
  9. I

    Creating a unique ref with a twist!!

    Tim's point is very valid and my approach won't provide the correct number if the categories can be deleted. I will have a look around for the solution, but hopefully someone else will know the correct approach and jump in.
  10. I

    Clearing a record in a data entry form

    Dan, glad to be of help. I fairly new to VBA myself, and I don't really know what books are available. There are some very talented guys who do a lot on this forum - hopefully they can can recommend some good material for us both. Regards....Peter
  11. I

    Clearing a record in a data entry form

    I think you are wanting the cancel/undo action. Create a Command Button, select 'Record Operations' and 'Undo Record'. If you need to close the record at the same time, you can insert a Docmd.Close command in your code after the Undo Event. Alternatively, you can try DoCmd.Close ,,acSaveNo...
  12. I

    insert pictures onto form

    Brandon, I have never needed to do this, but this is what i would try. Set up an image control on your form which will hold the picture. When the user selects make and model, they would click a 'View' button, whose 'On Click' event would change the picture property to whichever picture was to...
  13. I

    Question

    Basically you want to pass the family Id across to your report as select criteria - "WHERE FamilyID = " & Me.ComboBoxName or a filter (without the WHERE) How are you doing the print? Is it a report that is picking up its criteria from a query, your code, etc???
  14. I

    Question

    Why don't you change the text box for the family ID to a combo box - the wizard will prompt you through the process to pull back the family ID and name.
  15. I

    Calculating Totals

    I don't see the connection between the 'Sales Rep' and 'Product Code' tables. you say the Sales Rep file has two fields - SalesRepID, SalesRep. I assume from your description that the Product file has two fields - ProductID, ProductDesc. To get the information you are after there must be a...
  16. I

    Creating a unique ref with a twist!!

    I have a couple of suggestions but I'm not much more than a beginner myself - so there may be better ways. Firstly, is it feasible to structure your db differently and use autonumber keys? Secondly, if I understand it correctly, when you enter the data, you select the category from the combo...
  17. I

    Calculating Totals

    When you say it doesn't work - what is happening. Nothing selected?, wrong result?... You have a different expression for each category - can you provide a sample of the expression you are using.
  18. I

    Creating a unique ref with a twist!!

    franqipana - I'm not sure you have provided enough info but let's see if we can get it started. Assuming you have a field for the reference number, then set the Control source property to:- =[ComboBoxName].[Column].(0) & " " & intNumOfEntries this basically just appends a space and the number...
  19. I

    Elementary Form Question

    Bob, Set up your combo box as a 'Table/Query' with rowsource like 'SELECT EmployeeNum, EmployeeName, EmployeeUnit FROM tblEmployees". have the following code executed by the After Update property of the Combo Box - Sub ComboBoxName_AfterUpdate() Me.UNITNUMBER = Me.ComboBoxName.Column(2) End Sub
  20. I

    Get record number of newly created record.

    Thanks Travis, that is working great now. I originally put in ContactID = !Id, thinking !Id was a generic variable for the returned id. On changing this to the primary key of the table, the error no longer appeared. Many thanks. ps. I have no idea of the differences between DAO, ADO, VBA -...
Back
Top Bottom