Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Queries Access mdb vs adp

Status
Not open for further replies.

Jamn3000

Programmer
Jan 1, 2005
2
US
With Access mdb, in the query you could type in

[Forms]![FrmTimeCard1]![Combo18]

This would read the information from the form timecard and from combo18.

What would you use in Access adp?
 
Are you trying to execute from the View interface? Can you show what you have tried that didn't work?
 
I have just started this program. The only thing I have tried is the [Forms]![FrmTimeCard1]![Combo18]. If I use @=Enter_Name the user has to type in the name. The mgr wants to read from a combo box.

What I am tring to do is have the query read from the form to give me the report based on the forms information.
 
ADPs have no 'native' queries. Everything is executed from SQL Server. The server has no way to read information from user interface, so...I guess you need a stored procedure returning a recordset and having an input parameter...

I would call the stored procedure from the GotFocus event of the combo-box (this is Access 2003 version code):

Private Sub ComboName_GotFocus()
Set Me.ComboName.Recordset = CurrentProject.Connection.Execute("dbo.SPName(" & [Forms]![FrmTimeCard1]![Combo18] & ")")
End Sub

In this way, the combo gets populated every time you place the cursor in it.

HTH



[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top