Search results

  1. seth_belgium

    Drop down list of years

    You could do it like this: Your listbox' name is lstYears. Private Sub Form_Load() Me.lstYears.AddItem Year(Date) - 5 Me.lstYears.AddItem Year(Date) - 4 Me.lstYears.AddItem Year(Date) - 3 Me.lstYears.AddItem Year(Date) - 2 Me.lstYears.AddItem Year(Date) - 1 Me.lstYears.AddItem Year(Date)...
  2. seth_belgium

    PLease help, problems with selstart & sellength not working as expected

    I think I got it, just take a look at the attached database. Greetz, Seth
  3. seth_belgium

    Combox filter then lock record

    You could avoid this problem by opening the record in a new form. That way your users cannot accidentally scroll to another record, provided that the recordsource of your new form is a query that results in only one record, namely the one that is selected in the combo box. You can design your...
  4. seth_belgium

    auto delete record button

    Like this: In this example, the name of your table is tblTable. Dim SQLEmptyTable SQLEmptyTable = "DELETE tblTable.* FROM tblTable;" DoCmd.SetWarnings False DoCmd.RunSQL SQLEmptyTable DoCmd.SetWarnings True This code will empty your entire table without asking confirmation. If you wish to...
  5. seth_belgium

    checkbox.value misbehaviour?

    Consider using the OnUpdate()-event. When you use OnClick, on the moment you click the checkbox, your code will be ran first instead of changing the checkbox's value. Hope it works! Seth
  6. seth_belgium

    Unrecognized database format

    To me, this is access' greatest flaw... It's not at all that stable when used in the wrong way. Multi-user environments are always dangerous. When the database runs on a non-windows server, you're guaranteed to run into trouble too. Luckaly you can (almost) always save your database from...
  7. seth_belgium

    Requery in a continuous form

    Is it absolutely nescessary for the form to be continuous? The simpelest sollution would be to make it a single form, showing only a single record.
  8. seth_belgium

    Text field 000

    Let's say that the name of your field is txtCode. In the OnUpdate()-parameter of your field, enter the following code in VBA: If Len(Me.txtCode.Value) = 1 then Me.txtCode.Value = "00000" & Me.txtCode.Value If Len(Me.txtCode.Value) = 2 then Me.txtCode.Value = "0000" & Me.txtCode.Value If...
  9. seth_belgium

    MultiUser Environment Help

    Have you considered splitting the database into two databases, one that is back-end and contains only the tables and another one that is front-end and contains everything else and only had linked tables to your back-end database. Every user can then take a copy of the front-end database and...
  10. seth_belgium

    Continuous Form -> Different BG color

    Seriously?? Yay!! :-D I'll wait for the next release then (Does anyone know when that will be?).
  11. seth_belgium

    Simple yet complicated

    You can automate this process, you know...
  12. seth_belgium

    Random Deletions

    Any chance of uploading the database so we can take a look at it? Or is it confidential? ;-)
  13. seth_belgium

    Continuous Form -> Different BG color

    Hi everyone. I've searched the forum, couldn't find an answer. Is it possible to give each record in a continuous form a different backgroundcolor? For example: -------------------------------------------- Record 1 has a light yellow bgcolor -------------------------------------------- Record...
  14. seth_belgium

    How to hide the drop-down arrow on a combo box

    No, I don't think there is... Why would you want to do this?
  15. seth_belgium

    Joining Fields

    Yeah... Maybe you should take another look at your database-design... It isn't wise to have separate tables for what is essentially the same thing.
  16. seth_belgium

    need code to place date on check box or button click

    Try this: frmMain is your main form frmSub is your subform In your subform, you have to place this code in the OnUpdate() property of the flag. If Me.flgAdmitted.Value = True Then [Forms]![frmMain]![txtDateAdmitted].Value = Date() End If Same thing can be done for the discharged field...
  17. seth_belgium

    Simple yet complicated

    You could store the recordID and the userID in a separate table. Each time a user opens a record, you add both recordID and userID to that table. When the user exits the record you can delete that line from the table. That way you can always have an overview of who is accessing what data. But...
  18. seth_belgium

    pass values between subs

    At the top of your code-screen, you'll see "Option Compare Database". Below that text, you can declare your variable. Declaring a variable is done like this: Dim MyVar (As Type) For example: Dim strtypes As String The "As String" part isn't nescessary, but it's always better to declare a...
  19. seth_belgium

    opening form

    Just refer to the combo's value. For example: Your combo's name is 'lstForms' If Me.lstForms.Value = "Value 1" then DoCmd.OpenForm "Form 1" If Me.lstForms.Value = "Value 2" then DoCmd.OpenForm "Form 2" If Me.lstForms.Value = "Value 3" then DoCmd.OpenForm "Form 3" If Me.lstForms.Value = "Value...
  20. seth_belgium

    Lock old prices from updating

    This is a way to do it: Add a flag in your table, call it 'Locked'. When you want to 'lock' prices, set it's value to true (flag it). In your form, add the flag you just created. You can make it visible or hide it, it doesn't matter. On the field(s) you wish to lock when the flag is flagged...
Back
Top Bottom