Recent content by Thinh

  1. T

    Display all company details after double click in list view.

    Please double check you [ID]. This could be confusing since there are two instance of it. Try the following code to open the form. Look up the Docmd.OpenForm it has other parameters that may be useful in your situation. Private Sub Jump_To_Detail() DoCmd.OpenForm "Enquiry Detail", acNormal, ...
  2. T

    Dynamic Controls

    Will it work with the MS Access runtime?
  3. T

    Dynamic Controls

    I see your implementation. but with datasheet you cannot have different control on each line like in my screenshoot. The controls are limited by column. In my Implementation i can control what type of control is used for each line. I can make the field require or not required by changing a...
  4. T

    Dynamic Controls

    I have managed to create dynamic controls in MS Access. the only problem that I have is that it wont work in compiled mode. I am creating a new form on the fly and then insert controls into that form before displaying it. It seems database structure will get very simple with dynamic controls. I...
  5. T

    Dynamic form? Maybe?

    I have some code that is quite complex for creating dynamic controls. I believe it may solve your issue. Let me know if this is something you are looking for. Please check the picture for the setup.
  6. T

    Controls Format feature to display required fields

    I seen a code that you can add into the format section of a control to have it display required fields in red if it was empty. I can't seems to find that code. Anyone kind enought to share the code. the code look like *@* Thanks in advance Jonny
  7. T

    Combo box gray out after losing focus

    I never seen this effect before. There is no code behind it or anything. I have a combo box on a split form. I get the focus when i click on the combo box but when i click on a different control the combo box turn gray. Is in effect of a split form. Anyone able to explain this behavior. Thanks...
  8. T

    How to delete all the entries in a Subform using a button on the main form??

    If you want more control over how the deletion occured just write your own SQL to do it. Subform Query dim strSql as string strSql = "DELETE from Table Child where WarrentyID =" & me.txtWarrentyID.value docmd.execute strSql Main SQL Query strsql = "DELETE from Table Parent Where WarrentyID ="...
  9. T

    Tree Structure

    Let me see if this is what you are asking for. from the main table you create a query that only hold parent item(make item) only. by join the table and query you can establish what you are looking for
  10. T

    Dynamically Build Query

    odin71 review my method and let me know
  11. T

    Dynamically Build Query

    Check this code out. It should take care of all the situation that may rise. Dim strsql as string dim status as integer If len(me.txtEntryDate.value & "") <> 0 then status = status +1 If len(me.txtAuthor.value & "") <> 0 then status = status +2 If len(me.txtDescription.value & "") <> 0 then...
  12. T

    Tree Structure

    http://www.access-programmers.co.uk/forums/showthread.php?t=170577 Check out my tree view sample database. It is currently setup as menu system but i believe it will satified your need.
  13. T

    Organizing If-else-statement

    The number I use are exponitial power of two. There is no issue using these number. I am just using binary code to list all the combination. I have given the break down of the logic and there is no way there could be a duplicated. 001 = 1 1 010 = 2 2 011 = 3 1+2 100 = 4 4 101 = 5 1+4 110 = 6...
  14. T

    If Statement calling Msg Box

    Simple solution dim status as integer if len(me.txtcontrol1 & "") = 0 then status = status +1 if len(me.txtcontrol2 & "") = 0 then status = status +2 if len(me.txtcontrol3 & "") = 0 then status = status +4 select case status case 1 msgbox "Required control1" case 2 msgbox "Required control2"...
  15. T

    Organizing If-else-statement

    Here is a solution that will make nested if else statement easier to read and handled. This approach comes handy in many situation. Below is just how easy a simple control validation can look like. standard approach: if len(me.txtcontrol1 & "") = 0 then msgbox "required control1" end if if...
Top Bottom