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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Listbox selection changes data in field



 
 
Thread Tools Display Modes
  #11  
Old August 7th, 2005, 07:13 PM
Bill H via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

wish I could show you. I'll do researching and maybe find another way. This
seems to be it though.


--
Message posted via http://www.accessmonster.com
  #12  
Old August 7th, 2005, 08:09 PM
Bill H via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

Hint Hint


--
Message posted via http://www.accessmonster.com
  #13  
Old August 7th, 2005, 09:23 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Bill H via AccessMonster.com" wrote in message
...
Hint Hint


--
Message posted via http://www.accessmonster.com



  #14  
Old August 7th, 2005, 10:58 PM
Bill H via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

Thanks for your help. Let me know if you want to help further...by seeing
what I have so far. I need someone to help.


--
Message posted via http://www.accessmonster.com
  #15  
Old August 8th, 2005, 12:16 AM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

I'd prefer not getting your database.

Explain in words what your form looks like, and what you're trying to do.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Bill H via AccessMonster.com" wrote in message
...
Thanks for your help. Let me know if you want to help further...by seeing
what I have so far. I need someone to help.


--
Message posted via http://www.accessmonster.com



  #16  
Old August 8th, 2005, 05:10 PM
Bill H via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

Just kidding. This is so simple that it's starting to get stupid.

I want one form that lists the ssn and names, in alphabetical order, of
everyone in the db. I either double-click the name or have a command button
that opens up either form A or B depending on the dutyclass = or "A".

I have all of this and it works great except when dutyclass"A" the form
shows no data. I still can't find anything on how to do this.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200508/1
  #17  
Old August 8th, 2005, 07:06 PM
Bill H via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

I started a new db with a table, query and 3 forms(SelectForm, FormA and
FormB). I used the other code and it still didn't work so I tried to
simplify it. This is the code I'm using now, but can't seem to get line 2
correct with the field DutyClass="A". Any ideas?

thanks,
Bill


Private Sub lstSelect_DblClick(Cancel As Integer)

If Me!lstSelect = [DutyClass] = "A" Then

DoCmd.OpenForm "FormA", , , "SSN = """ & Me!lstSelect & """"

Else
DoCmd.OpenForm "FormB", , , "SSN = """ & Me!lstSelect & """"

End If
End Sub


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200508/1
  #18  
Old August 8th, 2005, 10:21 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

Presumably lstSelect contains an SSN value. Why, therefore, would you check
whether it's equal to DutyClass = "A"?

If, in fact, lstSelect has a value DutyClass = "A" in it, you'd need to use

If Me!lstSelect = "[DutyClass] = ""A""" Then

How do you determine whether it's DutyClass A or not?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Bill H via AccessMonster.com" wrote in message
...
I started a new db with a table, query and 3 forms(SelectForm, FormA and
FormB). I used the other code and it still didn't work so I tried to
simplify it. This is the code I'm using now, but can't seem to get line 2
correct with the field DutyClass="A". Any ideas?

thanks,
Bill


Private Sub lstSelect_DblClick(Cancel As Integer)

If Me!lstSelect = [DutyClass] = "A" Then

DoCmd.OpenForm "FormA", , , "SSN = """ & Me!lstSelect & """"

Else
DoCmd.OpenForm "FormB", , , "SSN = """ & Me!lstSelect & """"

End If
End Sub


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200508/1



  #19  
Old August 12th, 2005, 09:42 AM
Bill H via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

The DutyClass field is in another form as initial in-processing. Afterward,
the different sections can access their dutyclass primarily, but also must
have access to the other dutyclasses. However, this data is already in the
db for testing purposes of this step.

I've reversed the DutyClass to the top. Now FormB opens with A data, but
FormA does not open at all when DutyClass=A person is selected. It opens in
FormB and has no data. After days of testing many different ways, it appears
that the Else funtions are not being recognized. This is in both my primary
db and the one I made up just for testing purposes of this code. What ever
is in the Else section, that form is not used and no data is shown. This is
why I wanted to put the DutyClass in the If...then line. That didn't work
either.

-----------------------------
Private Sub lstSelect_DblClick(Cancel As Integer)

If (Me!lstSelect) Then

DoCmd.OpenForm "FormB", , , "SSN = """ & Me!lstSelect & """ AND
DutyClass ""A"""

Else
DoCmd.OpenForm "FormA"

End If
End Sub
-------------------------------


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200508/1
 




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
How do I save an access document in word document? cmartin General Discussion 2 September 13th, 2005 11:26 PM
Help with relationship plase Rock General Discussion 5 July 4th, 2005 03:54 AM
Help with relationship plase Rock Database Design 5 July 4th, 2005 03:54 AM
Syntax needed to get needed reports Frank Lueder New Users 15 January 6th, 2005 09:39 AM
Adding staff photographs to my database KK New Users 2 September 3rd, 2004 07:41 AM


All times are GMT +1. The time now is 11:18 PM.


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