473,320 Members | 2,088 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,320 software developers and data experts.

Two Forms Linked to the Same Table

I have tblEvents which includes a Memo field for "Notes". I have a main
form to display various data from tblEvents, including a small space to
display the Notes field.

I'm trying to create a separate form (frmNotes) that displays the Notes
in a much larger area and allows editing.

I have a command button and code that opens frmNotes, no problem there.

frmNotes has tblEvents as its RecordSource. It has a text box bound to
tblEvents.Notes. It also has an ID field bound to tblEvents.ID.

With frmNotes.RecordsetType = Dynaset I can't get any data to display,
at least most of the time. The form opens up with "[AutoNumber]" in the
ID field and blank notes.

Oddly, every once in a while the current records' information actually
does populate. I can't discern what is different when this works vs.
when it doesn't. One concern I learned the hard way is making sure the
main form and the frmNotes aren't trying to update tblEvents at the same
time... I hosed the table once (good thing I had a backup!).

I found that if I set frmNotes.RecordsetType = Snapshot I can reliably
populate frmNotes, however I can't edit anything, of course.

I'm obviously missing something here. Your suggestions are greatly welcomed!
--
Smartin
Nov 13 '05 #1
2 2201
Hi,
Just a thought, why not consider using an unbound form and passing the
string to your notes form. Use the onclose event to send your edited
string back to the active record. Something like:

docmd.openform "frm_Notes"
forms!frm_Notes!txt_Notes = me.txt_Notes

'OnClose
forms!frm_Main!txt_Notes = me.txt_Notes

Alternatively, you could simply open the record to edit it...
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Notes"
stLinkCriteria = "[Note_ID]=" & "'" & Me![Note_ID] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit

I prefer the first method for the simple reason of having control over
how and when the data is updated. Hope this helps.

Nov 13 '05 #2
Anton wrote:
Hi,
Just a thought, why not consider using an unbound form and passing the
string to your notes form. Use the onclose event to send your edited
string back to the active record. Something like:


I like it... I like it a lot. Guess I was trying to make this way too
difficult. Thanks!

--
Smartin
Nov 13 '05 #3

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

Similar topics

3
by: polytimi8 | last post by:
Hello, I would like to know if it is possible to create a form in Access2000, which would function like a calendar for 8 operating rooms in hospital, showing which hours are those closed for a...
2
by: DataB | last post by:
Hi everyone! I have a forms problem. Bakground: I have created a number of tables. Of these, I have a main parent table (Personal Details) and a number of other child tables (Tax file No.,...
2
by: Mark | last post by:
I have been developing a new application (FE on local drive) which is attached to tables in a BE on a server. For testing purposes I had a copy of the BE in the same folder as the live BE and the...
2
by: Pat | last post by:
I'm having some problems with forms freezing up on me. I have a front end linked to tables in 2 back ends. Users can open a form (quotes) which is linked to a table in be1. while adding a...
1
by: Meaney | last post by:
Hi, I have two linked forms. The first form is called Exposure and the second form is called Counts. On the first form (Exposure) there is a text box that asks the user to input an ExposureID...
4
by: danthrom | last post by:
Hi, I have a database with four tables. tbl_Client client_alias (PK, text) tbl_Matters matterID (PK, autonumber) matter (text) client_alias (foreign key, tbl_Client)
5
AccessIdiot
by: AccessIdiot | last post by:
Or maybe why my username is AccessIdiot :P I just discovered the linked form functionality of the form wizard. I dumped the fields from two tables linked by a Survey_ID (autonumber primary key in...
3
by: TonyJH226 | last post by:
I’m using Access 2003 and am a novice to Access. I am creating a form to facilitate data entry to seven tables. The main table (A) has four sub-tables that are related to the main table by...
2
by: Luting | last post by:
Hi, Is it possible to update oracle via Access forms? I am thinking maybe I could make a link table connnected with oracle database. And the form could be based on the link table. Does this...
5
by: agarwasa2008 | last post by:
Hi, I have a linked table called tbltest and some bounded forms (which add, update, delete records) that were created using that linked table. For some necessary reasons I had to create another...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.