MS Access on load blank form and start the find

akalehzan

New member
Local time
Today, 04:15
Joined
Dec 23, 2007
Messages
7
Hi All,

I have a form that I like to behave this way:

1. I have a form that has some fields like subj_num , Subj_date and etc….
2. Ideally I like to have the form to be open blank.
3. In this form I have a text field called “Text21” that is not bounded to any table’s fields.
4. Also I have a button that is called “Find records “ that is set on click to call the following code:
Code:
Private Sub Command20_Click()
  'Me.subj_num.SetFocus
  Me.Text21.SetFocus
  subj_num = Text21
  
   DoCmd.FindRecord Me.subj_num, acEntier, True, acSearchAll, True, acCurrent, True

End Sub

5. I setup the form property Sheet \data to :
Filters: left blank
Data entry: yes
Allow Additions: No
Allow Deletions: No
Allow edits No
Allow Filters: Yes
Let’s say I type 22 “Text21” filed and click on “Find records “button, then I get the following error:
Run-time error ‘-2147352567 (80020009)’:
You can’t assign a value to this object.

Can someone please advice:D
Thanks in advance,

Abrahim
 
My guess is that you will need to set Data entry: No
 
Changing Data entry to no,
and click on “Find records “button, then I get the following error:
Run-Time error '3326'
This recordset ins not updateable:eek:


Abrahim
 
Simple Software Solutions

Looking at your Quote it reads

DoCmd.FindRecord Me.subj_num, acEntier,...

This should be acEntire
 
Data entry: yes
Allow Additions: No

if you have data entry yes (ie use this form for new items only)
and additions no (ie dont allow new entries)

you will only ever get a blank form

in this case all the controls in the detail section will not be visible, and this can also introduce curious behaviour in the other form sections
 
Dear All,

This form is contains fields from three tables that are linked “relationship” by “Subj_num “ field.

It will be mainly used to search for subj_num from the main table that is “ID” table.

So, there is not going to be any data entry, update or delete records.
However, after running each search we would like to loop through each record every one second.

Meaning that, if the search result was 5 records, then MS Access view us each record every one second automatically.
We have done such a code in Javascripts in some other database interface.
What do you all suggest at this point to approach this?:confused:
Thanks for any help.
Abrahim
 

Users who are viewing this thread

Back
Top Bottom