Question : Creating a naviagation bar across access forms (similar to dropdown menus on websites)

Hi,

I have an access form which is able to open another access form using a drop down combobox. It then sets the value of the combobox on the newly open form.  

I'm doing this to create a navigation bar across the top of an Access form that allows the user to jump to data on each psychologist in the database.

However, I keep getting a random dropdown box hovering over the center of the new form that I have opened. What am I doing wrong?

Also ... is there a better way to create a navigation bar than this. I was planning to have one main form that stays open and then have other forms open and close that synchronise with this main page. I was only keeping the main page open as a way of storing the data that the user has entered.

And if you haven't guessed - I'm not yet up with visual basic (I'm getting a few books to sort that but it'll take a while to read them).

Here's the code I have on the main search form:

Private Sub Psychologist_quicksearch_Enter()
Me.Psychologist_quicksearch.Value = Null
End Sub
Private Sub Psychologist_quicksearch_Change()
Me.Psychologist_quicksearch.Dropdown
End Sub
Private Sub Psychologist_quicksearch_AfterUpdate()
DoCmd.OpenForm ("A-Psychologist")
Me.Psychologist_quicksearch = Forms("Search-Page").Psychologist_quicksearch
Me.Unitname_quicksearch = Forms("Search-Page").Unitname_quicksearch
End Sub
Private Sub Unitname_quicksearch_Change()
Me.Unitname_quicksearch.Dropdown
End Sub



And here's what I have on the form that opens up:

Private Sub Psychologist_quicksearch_Enter()
Me.Psychologist_quicksearch.Value = Null
End Sub
Private Sub Unitname_quicksearch_Change()
Me.Unitname_quicksearch.Dropdown
End Sub



Answer : Creating a naviagation bar across access forms (similar to dropdown menus on websites)

>> the primary key is on (DEipUserID+DEipServiceID )
Ok, the query is incorrect then.  Because by definition, when you partition on the primary key, every single one is unique and will return row number of 1.

Going back to the question,
[For the first row islatest =1, 2nd row arrives go to prev record change IsLtatest = 0 and put IsLatest = 1 for new record.]
And one query you had above, I suspect you actually want, what is the definition of "2nd row", is it "2nd and thereafter rows per DEipUserID+DEipServiceClientID"?  Whatever it is, partition by that combination.


;with tmp as (
select deipuserid, deipserviceid, islatest, rn=row_number() over (partition by deipuserid, deipserviceClientid order by eipinsertdttm desc) from dbo.FactUserClientUse)
update tmp set islatest=case when rn=1 then 1 else 0 end
Random Solutions  
 
programming4us programming4us