A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can't see value in unbound text box & filtering a continuous form



 
 
Thread Tools Display Modes
  #1  
Old March 7th, 2006, 07:39 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Can't see value in unbound text box & filtering a continuous form

I really was hoping someone could help me solve a problem and give me a
suggestion:

I have 2 forms:

Employees
EmployeesActivity

When in the Employees form, I click a button that opens up the
EmployeesActivity.

The EmployeesActivity is a continuous form that has a list of the
activity this employee has performed. On click, the DatabaseID from
the Employees Form should get populated into an unbound text box called
[txt_DatabaseID]. I do this as follows:


Private Sub bt_EmployeeActivity_Click()
On Error GoTo Err_bt_EmployeeActivity_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "EmployeesActivity"

stLinkCriteria = "[DatabaseID]=" & Me![DatabaseID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms!EmployeesActivity.txt_DatabaseID = Forms!Employees.DatabaseID


Exit_bt_EmployeeActivity_Click:
Exit Sub

Err_bt_EmployeeActivity_Click:
MsgBox Err.Description
Resume Exit_bt_EmployeeActivity_Click

End Sub



From there the EmployeesActivity form has a record source set to a

query. The query reads as follows:

SELECT EmployeesActivity.ActivityID, EmployeesActivity.DatabaseID,
EmployeesActivity.Activty, EmployeesActivity.ActivityDate,
EmployeesActivity.ReviewType, EmployeesActivity.IncidentType
FROM EmployeesActivity
WHERE
(((EmployeesActivity.DatabaseID)=[Forms]![EmployeesActivity]![txt_DatabaseID])
AND ((EmployeesActivity.DeletedActivity)=False));


From here (hoping), I should get a list of all activity associated with

this employee.

I have 1 problem & 1 question:

#1 - When I click the button from the Employees form, the unbound text
box does get the DatabaseID from the previous form, but I am unable to
see it. I know the id is there for 2 reasons: 1. When I click in
the text box the cursor will be placed somewhere after the number. If
I highlight the rest of the text box (moving to the left) and copy and
paste, into notepad, I will see the number in notepad. 2. If I
minimize the screen and then restore it, I am able to see the number.

#2 - Is setting the record source to a query, the best way to filter
all records on a continuous form?

Thanks in advance.

Dave

  #2  
Old March 7th, 2006, 08:15 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Can't see value in unbound text box & filtering a continuous form

Why not just use the EmployeesActivity form as a subform and use DatabaseID
as your Master/Child link?

"scadav" wrote:

I really was hoping someone could help me solve a problem and give me a
suggestion:

I have 2 forms:

Employees
EmployeesActivity

When in the Employees form, I click a button that opens up the
EmployeesActivity.

The EmployeesActivity is a continuous form that has a list of the
activity this employee has performed. On click, the DatabaseID from
the Employees Form should get populated into an unbound text box called
[txt_DatabaseID]. I do this as follows:


Private Sub bt_EmployeeActivity_Click()
On Error GoTo Err_bt_EmployeeActivity_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "EmployeesActivity"

stLinkCriteria = "[DatabaseID]=" & Me![DatabaseID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms!EmployeesActivity.txt_DatabaseID = Forms!Employees.DatabaseID


Exit_bt_EmployeeActivity_Click:
Exit Sub

Err_bt_EmployeeActivity_Click:
MsgBox Err.Description
Resume Exit_bt_EmployeeActivity_Click

End Sub



From there the EmployeesActivity form has a record source set to a

query. The query reads as follows:

SELECT EmployeesActivity.ActivityID, EmployeesActivity.DatabaseID,
EmployeesActivity.Activty, EmployeesActivity.ActivityDate,
EmployeesActivity.ReviewType, EmployeesActivity.IncidentType
FROM EmployeesActivity
WHERE
(((EmployeesActivity.DatabaseID)=[Forms]![EmployeesActivity]![txt_DatabaseID])
AND ((EmployeesActivity.DeletedActivity)=False));


From here (hoping), I should get a list of all activity associated with

this employee.

I have 1 problem & 1 question:

#1 - When I click the button from the Employees form, the unbound text
box does get the DatabaseID from the previous form, but I am unable to
see it. I know the id is there for 2 reasons: 1. When I click in
the text box the cursor will be placed somewhere after the number. If
I highlight the rest of the text box (moving to the left) and copy and
paste, into notepad, I will see the number in notepad. 2. If I
minimize the screen and then restore it, I am able to see the number.

#2 - Is setting the record source to a query, the best way to filter
all records on a continuous form?

Thanks in advance.

Dave


  #3  
Old March 7th, 2006, 08:27 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Can't see value in unbound text box & filtering a continuous form

Two questions:

1. By mater/child link are you referring to setting up a relationship?

2. There is no more room on the form for the subform, so I was just
wanted to setup a separate form all together.

  #4  
Old March 7th, 2006, 10:56 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Can't see value in unbound text box & filtering a continuous f

Tables have relations and forms-subforms are link as Master/Child in a
similar fashion.

You might look into adding tabs to the form and link that way.

"scadav" wrote:

Two questions:

1. By mater/child link are you referring to setting up a relationship?

2. There is no more room on the form for the subform, so I was just
wanted to setup a separate form all together.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie Looking for Help Little Penny Using Forms 6 December 27th, 2005 08:33 PM
Add New Field to DB Karen Database Design 7 October 19th, 2005 08:03 PM
Access reports with a horizontal line after each record??? Bill via AccessMonster.com Setting Up & Running Reports 6 March 9th, 2005 04:51 PM
Design help, please SillySally Using Forms 27 March 6th, 2005 04:11 AM
dlookup miaplacidus Using Forms 9 August 5th, 2004 09:16 PM


All times are GMT +1. The time now is 09:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.