Re: Recordsource - display problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



What tells you that only one record is being retrieved?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Martin Dashper" <m.h.dashper@xxxxxxxxx> wrote in message
news:44685dc7.615410223@xxxxxxx
I've tried your method to turn off Name AutoCorrect (new database,
import objects etc) - No Change

I've decompiled the database - No Change

There are no errors displayed.

All bound controls match the table - as I said earlier, if the form's
Record Source property is set to the same table, then it displays
correctly

What is even more confusing is that I have a report which is pretty
much an exact copy of the form layout which has the same line in the
Open event - (Me.RecordSource = tableName) which prints all records
correctly, even when the form which called it does not.

Martin

On Mon, 15 May 2006 17:14:19 +0800, "Allen Browne"
<AllenBrowne@xxxxxxxxxxxxxx> wrote:

That should work in either of those events. (The Open event would be the
more efficient.)

Something else must be going on. Perhaps the database is corrupt due to a
naming problem generated by Name AutoCorrect. Details:
http://allenbrowne.com/bug-03.html

Or perhaps the VBA is corrupt. Decompile a copy of the database by
entering
something like this at the command prompt while Access is not running. It
is
all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

Presumably you have already disabled any error handler on this event, so
you
are notified of any error.

And presumably ALL the bound controls on the form have an exact matching
field name in this table, and the data types are correct. Access can crash
if bound fields just disappear or change data type.

"Martin Dashper" <m.h.dashper@xxxxxxxxx> wrote in message
news:44683d98.607172047@xxxxxxx
I've tried in both 'On Open' and 'On Load'

Dim tableName As String
tableName = "tblDaySheet_Martin2"
Me.RecordSource = tableName

I have also tried the above using the table's name directly without
the intervening variable.

Martin


On Sat, 13 May 2006 00:31:44 +0800, "Allen Browne"
<AllenBrowne@xxxxxxxxxxxxxx> wrote:

Okay, in what event are you changing its Recordsource?

Post the code.

"Martin Dashper" <m.h.dashper@xxxxxxxxx> wrote in message
news:44644815.695510@xxxxxxx
No, it is not a subform, it is a form created by the form wizard (in a
tabular layout) and is opened from another form using
DoCmd.OpenForm.....

Martin

On Thu, 11 May 2006 23:57:56 +0800, "Allen Browne"
<AllenBrowne@xxxxxxxxxxxxxx> wrote:

Martin, is this form a subform?

If so, you may need to also programmatically clear the subform
control's
LinkMasterFields and LinkChildFields properties. When you assign the
RecordSource, Access has a guess and sets these to whatever it feels
like.

"Martin Dashper" <m.h.dashper@xxxxxxxxx> wrote in message
news:44635915.18948015@xxxxxxx
I have a bound form which, when the Record Source is hardwired on the
data tab of the form's properties, will display all appropriate
records. However, if I set the Record Source in code eg.
(Me.RecordSource = "myTable"), it only displays the first record.


.



Relevant Pages

  • MSSQL 2000 JDBC Driver Bug in get/setTimestamp using Calendar
    ... I am trying to set my time stamps in GMT into the database. ... Whether I am reading or writing the date, the driver jumps ahead with one ... String tableName) ... insertStmt.setString(2, insertedGMTValue); ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Can I use column(0) in a Stored Procedure?
    ... simply writing a UI that sends "Select * from tablename" to the database, ... union all ... createGetProcedure 'testDescription' ...
    (microsoft.public.sqlserver.programming)
  • Re: Embedded SQL and MS ACCESS Dates
    ... Date and Time Data Types ... Because OpenESQL can access any relational database and each database has ... of specifying dates and times in input host variables. ... To specify a date, move the date into the host variable in the form ...
    (comp.lang.cobol)
  • Re: Datasets - Best approach to use?
    ... > William (Bill) Vaughn ... Using ASP (or ... the bound controls won't call Update--you ... It accesses data in an SQL Server database. ...
    (microsoft.public.vb.database)
  • Re: Recordsource - display problem
    ... Or perhaps the VBA is corrupt. ... Decompile a copy of the database by entering ... and the data types are correct. ... RecordSource, Access has a guess and sets these to whatever it feels ...
    (microsoft.public.access.formscoding)