Connecting Tech Pros Worldwide Forums | Help | Site Map

dialog box

Familiar Sight
 
Join Date: Oct 2006
Posts: 140
#1: Nov 13 '06
hi all,

help me
i ve person name repeated so many times in my table. while loading the form i want a dialog box has to open and i ve to enter a name on that. then it has to display all details abt her work. is this possible.

suggestion and help with codes yeah
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,866
#2: Nov 13 '06

re: dialog box


Quote:

Originally Posted by indhu

hi all,

help me
i ve person name repeated so many times in my table. while loading the form i want a dialog box has to open and i ve to enter a name on that. then it has to display all details abt her work. is this possible.

suggestion and help with codes yeah

All you need is a form based on the table showing all records.

Another form with a combobox (cboUsers) listing all users with a unique id (PK of the table ideally) field hidden.

Then behind a command button (cmdFindUser) put the following code:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub cmdFindUser()
  3.  
  4.   DoCmd.OpenForm "First Form Name", , , "[UserID]=" & Me.cboUsers
  5.  
  6. End Sub
  7.  
  8.  
Familiar Sight
 
Join Date: Oct 2006
Posts: 140
#3: Nov 14 '06

re: dialog box


Quote:

Originally Posted by mmccarthy

All you need is a form based on the table showing all records.

Another form with a combobox (cboUsers) listing all users with a unique id (PK of the table ideally) field hidden.

Then behind a command button (cmdFindUser) put the following code:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub cmdFindUser()
  3.  
  4.   DoCmd.OpenForm "First Form Name", , , "[UserID]=" & Me.cboUsers
  5.  
  6. End Sub
  7.  
  8.  


this master form showing all the details. there i placed the command-

cmdfinduser.

and create seperate form with combobox. then i placed the code behind the

command-cmdfinduser


Private Sub cmdFindUser_click()

DoCmd.OpenForm "searchuser", , , "[Person]=" & Me.cbouser

End Sub

compile error is coming. method or datamember not found

pls help and sort out the problem yeah
Familiar Sight
 
Join Date: Oct 2006
Posts: 140
#4: Nov 14 '06

re: dialog box


Quote:

Originally Posted by indhu

this master form showing all the details. there i placed the command-

cmdfinduser.

and create seperate form with combobox. then i placed the code behind the

command-cmdfinduser


Private Sub cmdFindUser_click()

DoCmd.OpenForm "searchuser", , , "[Person]=" & Me.cbouser

End Sub

compile error is coming. method or datamember not found

pls help and sort out the problem yeah


its working now..

i ve placed the cmd in searchuser form. and i ve given ID.

thank u
Familiar Sight
 
Join Date: Oct 2006
Posts: 140
#5: Nov 14 '06

re: dialog box


Quote:

Originally Posted by indhu

its working now..

i ve placed the cmd in searchuser form. and i ve given ID.

thank u

hi its working but only detail is coming at a time
since i ve repeated names in my table. when i enter name as"pinky" in the combo it should display all the work he did. how to do that.

help me
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,866
#6: Nov 14 '06

re: dialog box


Quote:

Originally Posted by indhu

hi its working but only detail is coming at a time
since i ve repeated names in my table. when i enter name as"pinky" in the combo it should display all the work he did. how to do that.

help me

You've repeated the names but only one UserID

If you want to go back to using the name you just need to surround it with single quotes designating text as follows:

DoCmd.OpenForm "searchuser", , , "[Person]='" & Me.cbouser & "'"
Reply