Ask Your Question
0

Base : subform row count

asked 2017-05-04 22:13:59 +0100

jocko1 gravatar image

updated 2017-05-05 17:57:51 +0100

EasyTrieve gravatar image

Hi,

I have a Main Form and a Sub form. Two text fields are entered in the Main Form.

Move to the Sub form the Sub Form is displayed as a Grid and data navigation control placed into Sub Form Data is entered into Sub Form (2 records).

How can the record count ( using above record count = 2) be displayed in the Sub Form without using the data navigation control (ie. 1 of 2) and how can the count be passed to the Main Form?

An example will be great.

edit retag flag offensive close merge delete

Comments

As stated elsewhere, moving information from sub form to main form will require a macro. Do you have any macro coding experience?

Ratslinger gravatar imageRatslinger ( 2017-05-04 22:30:03 +0100 )edit

no I don't

jocko1 gravatar imagejocko1 ( 2017-05-04 22:40:18 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-05-04 23:07:43 +0100

Ratslinger gravatar image

updated 2017-05-04 23:12:28 +0100

I don't think displaying the count of the records on a subform is a problem. Create a query & display it in a control on another form (sub sub form). Moving that information to the main form is the problem. You need a macro.

There are problems with getting someone else to provide you with the necessary macro code. If things change you have no way of making the necessary code changes to accommodate the changes. Secondly, it is usually best for the person writing the code to have complete access to the .odb in order to get specific information about the forms/tables/controls.

For example, to get the number of records displayed is fairly simple with this line:

iCount = ThisComponent.Drawpage.Forms.getByName("YOUR_FORM").getByName("YOUR_SUBFORM").RowCount

But even with this you can see the form & subform names are still needed. Along with this is then needed the control names for where to display on subform & what to do with it on the main form.

edit flag offensive delete link more

Comments

1

@jocko1 It appears to me from this question & your previous one, you need some information pieced together for some other reason. Why not explain what you have and what you actually need as an end result? It seems (at least on the surface) a query might do the job.

Ratslinger gravatar imageRatslinger ( 2017-05-04 23:37:57 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-05-04 22:13:59 +0100

Seen: 124 times

Last updated: May 05 '17