473,408 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Go to specific record in form

Looking for some expert help here.

Caveat: I do not know SQL, and I've built a database basically by trial and
error (unfortunately, I don't have much time to learn Access as I would
want).

My basic database form is for patients, and I store their info in the
database and link to videos of surgery, etc. I made a switchboard, a few
queries, and a few reports that I can use to look at categories, etc.
However, instead of run a report or add new form or edit form, I want to go
to a specific form. Example, to go patient John Doe's form, a window would
prompt me to enter the last name and it would go directly to that patient's
form. In the queries I made, I could just type [Enter patient name] under
the criteria and it would prompt me to enter the name when running the
query. Any way to do that for the GoToRecord macro or otherwise?

Thanks so much.
Oct 8 '07 #1
1 3614
Kevin Welch wrote:
Looking for some expert help here.

Caveat: I do not know SQL, and I've built a database basically by trial and
error (unfortunately, I don't have much time to learn Access as I would
want).

My basic database form is for patients, and I store their info in the
database and link to videos of surgery, etc. I made a switchboard, a few
queries, and a few reports that I can use to look at categories, etc.
However, instead of run a report or add new form or edit form, I want to go
to a specific form. Example, to go patient John Doe's form, a window would
prompt me to enter the last name and it would go directly to that patient's
form. In the queries I made, I could just type [Enter patient name] under
the criteria and it would prompt me to enter the name when running the
query. Any way to do that for the GoToRecord macro or otherwise?

Thanks so much.

Hmmmm...for simplicity...what I would consider is creating a form for
your patients. The Form's recordsource might me
Patients
or something like
Select * From Patients

This form would select and display each patient record.

Once you have that set up, drag the Detail bar down from the FormHeader
bar. Then pull up to toolbox and drag a combobox to the header area.
You'll have 3 options; the third is Find A Record based on value of
Combo box. Select that and follow the wizard.

Next, let's say the ComboBox's name is Combo6. And you have a field
called PatientID that's the primary key and is the first (hidden) field
in the combo. In the OnCurrent event of the form you could have
something like
Me.Combo6 = IIF(Not Me.NewRecord,Me.PatientID,0)
This will assign the combo to the currect patient record or 0 to a new
record with no patient displayed.

After you add a new record, you'll want to requery the combo (so the new
patient is listed in the combo. In the form's AfterUpdate event you
could do something like
If Me.combo6 = 0 Then
Me.Combo6.Requery
Me.Combo6 = Me.PatientID
Endif

Now you can find the PatientID from the same form by selection the
Patient from the dropdown.

Oct 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: BLUE WATER | last post by:
Help, When I am finished entering in data into my form A, I press the save button that saves this new data to a new record. However I would like my other form to open at a specific record, the...
1
by: Ian | last post by:
I want to open a form at a particular record, but I think I'm running into problems because the recordsource query is executing asynchronously. In the form's open event I use...
2
by: nkoske | last post by:
I have a form with a subform in datasheet view and I have a event on one of the fields in the subform, so that the user can double click it and go to expanded information based on that field. ...
2
by: Timbo | last post by:
Hi there, I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2. My first table is a table containing all the Tickets I got. The field ”Ticket”...
2
by: Jpipher | last post by:
Let me explain what I am trying to accomplish... Two forms -- we'll call them "Main" and "Related" A command button on "Main" runs a union query. The union query results are shown in "Related"...
10
by: sara | last post by:
Hi - I have been struggling with solution ideas for this now for almost 2 weeks, and have not been able to figure this out. I have a user who creates a Purchase Order (tblPOData). In some...
3
by: mckbill | last post by:
Is there a way I can direct the cursor to a specific field (variable) in a form by typing the field name while in form view? I have a form with many fields, and it would be nice if there were...
1
by: cvillav | last post by:
Hello, I am new to Access and this forums, I have two tables and two forms to display the data. Tables Tbuilding Tcriteria Forms fmbuilding
2
by: eko99312 | last post by:
Let's say I have this form called Attendance List. The list was in datasheet form. In the list there were names and date checklist. The question is, I want to edit one of the names by double clicking...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.