Re: Recordsource - display problem
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Mon, 15 May 2006 21:33:11 +0800
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.
.
- Follow-Ups:
- Re: Recordsource - display problem
- From: Martin Dashper
- Re: Recordsource - display problem
- References:
- Recordsource - display problem
- From: Martin Dashper
- Re: Recordsource - display problem
- From: Allen Browne
- Re: Recordsource - display problem
- From: Martin Dashper
- Re: Recordsource - display problem
- From: Allen Browne
- Re: Recordsource - display problem
- From: Martin Dashper
- Re: Recordsource - display problem
- From: Allen Browne
- Re: Recordsource - display problem
- From: Martin Dashper
- Recordsource - display problem
- Prev by Date: Runtime 438 error
- Next by Date: Re: Recordsource - display problem
- Previous by thread: Re: Recordsource - display problem
- Next by thread: Re: Recordsource - display problem
- Index(es):
Relevant Pages
|