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  

Dlookup and then add more information on the same form



 
 
Thread Tools Display Modes
  #1  
Old January 7th, 2008, 03:02 AM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 96
Default Dlookup and then add more information on the same form

Hi,

I'm still learning how to update additional information on the same
table (tbl_Players). I have the list of Team and City but no
information on Location, Phone Number and Age. I have the form
connect to tbl_Players. Everytime I look for the Team and City, it
will need to input Location, Phone Number and Age on the same table.

tbl_Players:

--- FieldName: Team (PK)
--- FieldName: City (PK)
--- FieldName: Location
--- FieldName: Phone Number

On the form:

Dlookup: Team (unbound box)
Dlookup: City (unbound box)
Location (box)
Phone Number (box)


Event Procedu

CHECK_Team = DLookup("[Team]", "Tbl_Players", "[Team] Like ""*" &
Search_Team & "*"" And [City] Like ""*" & Search_City & "*""")

CHECK_City = DLookup("[City]", "Tbl_Players", "[Team] Like ""*" &
Search_AccessCode & "*"" And [City] Like ""*" & Search_City & "*""")

Me.Location = Me.Input.Location.Value
Me.PhoneNumber = Me.Input.PhoneNumber.Value


I'm not sure if I did that right thing. I want to use the same form
to look up (Dlookup) first and then add the information as below
within the selection of the DLookup. I have 50 Teams and each has
different location and phone number.

Your help would be much appreciated.
Thanks

  #2  
Old January 7th, 2008, 05:36 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Dlookup and then add more information on the same form

Hi,
not sure if I understand your question?
I see you have unbound boxes on your form. If you have all the boxes bound
to their matching field from the table, you will just be able to type the
values straight into the boxes without doing any DLookups. This will be much
simpler and it is the way Access is meant to work.
Download a couple of Access database templates from microsoft.com and have a
look at how they set up their forms for typing data into text boxes without
using DLookup.

Jeanette Cunningham


wrote in message
...
Hi,

I'm still learning how to update additional information on the same
table (tbl_Players). I have the list of Team and City but no
information on Location, Phone Number and Age. I have the form
connect to tbl_Players. Everytime I look for the Team and City, it
will need to input Location, Phone Number and Age on the same table.

tbl_Players:

--- FieldName: Team (PK)
--- FieldName: City (PK)
--- FieldName: Location
--- FieldName: Phone Number

On the form:

Dlookup: Team (unbound box)
Dlookup: City (unbound box)
Location (box)
Phone Number (box)


Event Procedu

CHECK_Team = DLookup("[Team]", "Tbl_Players", "[Team] Like ""*" &
Search_Team & "*"" And [City] Like ""*" & Search_City & "*""")

CHECK_City = DLookup("[City]", "Tbl_Players", "[Team] Like ""*" &
Search_AccessCode & "*"" And [City] Like ""*" & Search_City & "*""")

Me.Location = Me.Input.Location.Value
Me.PhoneNumber = Me.Input.PhoneNumber.Value


I'm not sure if I did that right thing. I want to use the same form
to look up (Dlookup) first and then add the information as below
within the selection of the DLookup. I have 50 Teams and each has
different location and phone number.

Your help would be much appreciated.
Thanks



 




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


All times are GMT +1. The time now is 10:07 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.