473,322 Members | 1,409 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,322 software developers and data experts.

Form & SubForm Event problem

48
Hi

I have a Form with a SubForm

The Form is bound to a Query, and is used for navigation.

In the event Form_Current there is :
wrkField = Me!TableField
SubForm.requery

The SubForm is UnBound

In the event SubForm_Current there is :
Me.SubFormField = wrkField
Msgbox Me.SubFormField

I don't understand why
- when navigating through the Query, for every occurence MsgBox is displayed twice (so SubForm_Current done twice)
- when Form is started, MsgBox is displayed twice (without any value) and two times (with the value of the first occurence)

Related to this, if it is possible to bind the (yet unbound controls of SubForm) to the wrkFields ? How ?

Thanks
Jan 10 '08 #1
3 1732
Dököll
2,364 Expert 2GB
Hi

I have a Form with a SubForm

The Form is bound to a Query, and is used for navigation.

In the event Form_Current there is :
wrkField = Me!TableField
SubForm.requery

The SubForm is UnBound

In the event SubForm_Current there is :
Me.SubFormField = wrkField
Msgbox Me.SubFormField

I don't understand why
- when navigating through the Query, for every occurence MsgBox is displayed twice (so SubForm_Current done twice)
- when Form is started, MsgBox is displayed twice (without any value) and two times (with the value of the first occurence)

Related to this, if it is possible to bind the (yet unbound controls of SubForm) to the wrkFields ? How ?

Thanks
Please forgive me, I did not quite understand what you are referring to, and I am sure you are saying what you need. Can you go into it more, precisely what you hope to achieve? Perhaps there's an idea we can refer you to.

In a bit!
Jan 11 '08 #2
wquatan
48
Please forgive me, I did not quite understand what you are referring to, and I am sure you are saying what you need. Can you go into it more, precisely what you hope to achieve? Perhaps there's an idea we can refer you to.

In a bit!
Don' know what I could tell more.

The Form is used to allow the user to navigate through the occurences presented to him by the Query

The SubForm (shows one occurence) is there to allow the user to do changes to the data, without immedeate commit to the table. The changes are only committed to the table after confirmation.

Of course, the MsgBox is just there for testing-purposes, it shows that SubForm_Current get's done twice for every occurence displayed
Jan 11 '08 #3
Minion
108 Expert 100+
I'm stumped at this point why the events would be launching twice, but I have an idea it has something to do with their relationship to one another. One of the first things I might try is putting a break in the main form and they using F8 to step through the program to see if anything jumps out to you. Sometimes it's a recursive value that calls upon itself.

I'll keep thinking on this and post anything I can find.

Hope this helps.

- Minion -
Jan 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a form with multiple pages on it. There is one text field on the third page of the form that I need the user to complete before leaving the form or moving...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
0
by: jphelan | last post by:
I have a subform that works fine until you import it into a new database when it crashes if you try to open it in either disign or form view. The form, "Attendees_Subform" in my application was...
12
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can...
4
by: piscogirl | last post by:
Hi all, Here's my case: I have a form: Event Form and a subform: AttendanceSubForm The user selects a name (from a Person Table) on the subform to register for the event. If the name is...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
3
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent...
11
by: mrowe | last post by:
I am using Access 2003. (I am also using ADO in the vast majority of my code. I recently read a post that indicated that ADO is not all that is was initially cracked up to be. In the back of my...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
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: 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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.