Search results

  1. CraigDolphin

    Recording logged in username (not workstation name)

    Sorry. Guess i misunderstood the question.
  2. CraigDolphin

    many to many relationship and subform

    The recordsource property of the main form should be bound to the master table (or a query of the same), the recordsource property of the subform should be bound to the junction table (a a query of the same). You can then see which fields are availble in each of the forms by clicking on the...
  3. CraigDolphin

    Recording logged in username (not workstation name)

    Really? I use that code and it returns the username of the logged in user: both in AC2K and AC2K7.
  4. CraigDolphin

    Enter info once for 3 tables

    Is this the same database as your other thread Harry? http://www.access-programmers.co.uk/forums/showthread.php?t=207852
  5. CraigDolphin

    Recording logged in username (not workstation name)

    Or you could just use Environ$("Username") whenever you need to retrieve the user's name.
  6. CraigDolphin

    Question Improving my Database

    Here's what airplane spotting suggests to me as a likely table structure: tbl AircraftType AircraftTypeID (auto, pk) AircraftTypeName tblAircraft AircraftID (auto,pk) AircraftTypeID (fk) AircraftSerialNumber tblLocations LocationID (auto,pk) LocationName tblObservers ObserverID (auto,pk)...
  7. CraigDolphin

    Prevent user from "Adding new record" if mandatory fields are null

    The way I approach this is to have a generic validation function that is saved in a general purpose module (ie not in a form module). Public Function validateform(myform As Form) As Boolean 'returns true if all required fields have data, or false if not. 'It will also create a popup message...
  8. CraigDolphin

    many to many relationship and subform

    Ordinarily you would you the main form bound to one of the 'master' tables, and the subform bound to the junction table. You use the pk field of the master table as the master/child key field that joins the from and subform. You can hide the key field in the subform, if you like, and just show...
  9. CraigDolphin

    Question Improving my Database

    You'd need to explain your database in a lot more detail, or better yet, attach an example of it along with an explanation of what you're modelling and how you want it to be useful in order for anyone to help you much. However, from the brief description given, I have to ask if you have a...
  10. CraigDolphin

    Contact Database Relationships

    With regard to the combo control. Check some things for me. For the form: Check the RecordSource property of the FORM. Make sure it is set to the table BusinessProducts. For the combo control: Check the Control Source property: make sure it is set to ProductID Check the Row Source property...
  11. CraigDolphin

    Nested IIf( with DMax and DateAdd not working correctly

    In what way do they not work? They produce the same output as the vba function based on the examples you posted. And the attached db shows them functioning on the form. Regardless, glad you have a working solution. :)
  12. CraigDolphin

    Contact Database Relationships

    Sounds like the rowsource for the subform is not correctly bound to the businessproducts table.
  13. CraigDolphin

    Nested IIf( with DMax and DateAdd not working correctly

    The following should do the trick also, without using vba: =IIf( [txt_coursedate]>DMax("certexpires","qry_personcert"), DateAdd("m",36,[txt_coursedate]), IIf([txt_coursedate]>=DateAdd("m",-3,DMax("certexpires","qry_personcert")), DateAdd("m",36,DMax("certexpires","qry_personcert"))...
  14. CraigDolphin

    My head is going to explode. Please help

    I second Bob's suggestion. From what I can see from the very blurry image, there's a need to revisit your basic table structure. Not knowing the nitty-gritty of what exactly you record and what you need to report, it's hard to be sure. But something like... tblBusinesses BusinessID (auto, pk)...
  15. CraigDolphin

    Contact Database Relationships

    To be honest I've never used any Macros in access so I'm not sure I can help you. I use vba and code my own using the vba editor. You could always delete the command button on the other form, and create a new one and setup a new macro for the new button using the new field names.
  16. CraigDolphin

    Contact Database Relationships

    Usually, you'd use a form bound to the businesses table, with a subform bound to the businessproducts table. The subform would be in continuous form view so you could see/add several rows at a time. The subform would be linked to the main form using the businessID field as the master/child key...
  17. CraigDolphin

    HELP!! With adding fields

    I don't see that he is trying to save the calculated values. Seems like he is displaying them in his form. Are you sure there's no extraneous [ or ] somewhere? If you can post the actual SQL for the query that might help. Better yet, post an example database that has the table(s) and the query...
  18. CraigDolphin

    Contact Database Relationships

    Well, there's your problem What you need is a table of businesses, a table of products, and a junction table that links products to businesses. ie Businesses BusinessID (auto, pk) BusinessName BusinessPhone BusinessFax etc Products ProductID (auto, pk) ProductName BusinessProducts...
  19. CraigDolphin

    Like Statements in Access 2007

    Would that not qualify as changing the combo to store the string? :p
  20. CraigDolphin

    Like Statements in Access 2007

    The combo box on the form is SHOWING the name but STORING the MLA number. So your query criteria is comparing a number to a string. Either change the combo to store the string, or change the query to use the criteria in the MLA number field.
Back
Top Bottom