Results 1 to 4 of 4
  1. #1
    Nokia N93 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    55

    Primarykey problem + Displaying hidden valus in FORM

    Hello, i need ur help
    I have two tables
    First :
    Callerphone
    CallerName
    Type of call (personal, question, problem)
    feedback
    and another table: Problems
    CallerPhone
    problemId
    problem
    problemtime
    status
    solution


    solutiontime
    toDepartment
    First of all, i want a different information to be displayed when i choose a different type of calling
    how i could do that??
    Ex. if i choose Personal,,, i want to which department Field only to be appeared
    if i choose Question, i want notes field only to be displayed
    if i choose problem, i want the whole form to be displayed
    Second, i made a form to enter the information,, i make the phoneNumber as the primaryKey
    So if i entered te first problem ,, then after two days the same phone has another problem i couldn't enter the seconed problem
    what i can Do?? if i changed the phone# as the primary key, how could i link the two tables??
    Seconed thing i want when the user click on the checkbox, then i want the solution, and the solutionDateTime to appear when i click on the check box otherwise it will be hidden (i want the currentDAte and current time to be entered automatically)
    i attached the file ,, Hoping you can help me

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    Hello Nokia 93. Firstly I would like to ask you whether or not you previous problem concerning check boxes is solved. If it is solved please do mark it solved. (to know how please follow the link below my signature to learn)

    Now for you problem here to make certain controls to appear and disappear u need to use the Visible property of the Controls

    for e.g. I have a Type a Combobox combo1. Whn the value selected is 1 i want only txtbox1 to be visible when 2 only txtBox2 will be visible and so on:

    on the AfterUpdate Event of combob1:
    Select Case Me.Combo1
    Case is = 1
    Me.txtBox1.Visible=True
    Me.txtBox2.Visible=False
    Me.txtBox3.Visible=False

    Case = 2
    Me.txtBox2.Visible=False
    Me.txtBox2.Visible=True
    Me.txtBox3.Visible=False
    Case=3
    Me.txtBox3.Visible=False
    Me.txtBox2.Visible=False
    Me.txtBox3.Visible=True
    End Select

    U need to set the visible property of all the text box to No. Its is also advisable to put the same code on the OnCurrent event of the form.



    suppose I have a check box Check1 and a TextBox txtBox1 I will put the code on the AfterUpdate even of the check Box to put Current date and time when ever the check box is checked.

    Me.txtBox1=Date+Time

  3. #3
    Nokia N93 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    55
    hi maximus, thanx for the reply

    well, it worked for me in a one form
    but i had it in a sub form ( it didn't work)
    is there is a way to work in a subform ???

  4. #4
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    Suppose you want to make a Control in visible in the sub form depending on the value of a control in the mainform:

    I have a combobox Combo1 on my main form and a textbox on my subform (table1) name txt1

    Now if the value selected in the combo box is 1 then i want the text box txt1 in the subform to be invisible. I type this code in the AfterUpdate even of the Combobox.

    if Me.Combo1= 1 then
    Table1.Form!Link.Visible = False
    end if

    Pls notice how the control on the subform is referenced here.

    pls mark the thread solved if this solves your problem.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-12-2010, 06:33 PM
  2. Replies: 1
    Last Post: 11-07-2010, 11:04 AM
  3. problem displaying data in report
    By dreamweaver547 in forum Reports
    Replies: 4
    Last Post: 10-15-2010, 04:26 PM
  4. Hidden Attributes
    By NMJones in forum Access
    Replies: 1
    Last Post: 02-09-2010, 10:57 AM
  5. Displaying a PDF in a Form
    By Chaz in forum Forms
    Replies: 0
    Last Post: 08-07-2006, 03:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums