VB problem...

MS Office Access

    Next

  • 1. Auto Spell Check a field
    I have some users that want to have some long text fileds (or memo fields) spell checked when they move out of that control. Is there a way I can call spell checking in the after update property or is there another way to do it (other than hitting F7 after they type)? TIA Ivan Grozney
  • 2. Referring to a control on a Main Form from a subform
    This is a multi-part message in MIME format. How do I refer to a control on a Main Form from the subform? Karen <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2800.1264" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face="Comic Sans MS">How do I refer to a control on a Main Form from the subform?</FONT></DIV> <DIV><FONT face="Comic Sans MS"></FONT> </DIV> <DIV> <DIV><STRONG><SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: 'Comic Sans MS'; mso-bidi-font-weight: bold"><STRONG><SPAN style="FONT-WEIGHT: normal; FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: 'Comic Sans MS'; mso-bidi-font-weight: bold"><FONT size=3>Karen </FONT></SPAN></STRONG><FONT face="Comic Sans MS" color=#000000 size=2></FONT></SPAN></STRONG></DIV></DIV></BODY></HTML>
  • 3. Updating Data Using a Form
    I have a form that has a command button that, when clicked, changes the active status of a position. On the form I also have a textbox for remarks. When the button is clicked I want to ask the user if he/she needs to update the remarks. If he answers "Yes" then another form opens with the text that is currently in the remarks. He can make his changes and click ok. The problem I am having is there are additional lines of code within the "on click" routine of the command button. The additional code is for updating a history table. That code runs before I have an opportunity to make the changes to the remarks. Is there a way to make the routine wait until the other form is closed? Or is there an easier way to go about this? Thanks in advance! Dwight
  • 4. PANIC!! Please asist
    Hello, I have a rather large database and it seems to have gone and died on me... This is not good... I click on a switchboard item and it does not do as it is supposed to... There is no way of getting to the back of the database as the bypass key is disabled unless anyone knows another way of doing this... Basically I need to get into this part so I can unlock the database... is tehre something I can do to revive my database??? I have tried importing everything into another database this is ok but the imported version does not work everything I seem to do in it seems to ask me for a macro which I never had or never created nor did anyone else... What can I do? Many Thanks James
  • 5. AutoFilter in Excel from Access
    I have button on my form that opens a query, copies it, and then pastes it into Excel. I then format from cells, delete some columns, and then freeze panes. I also want to put the auto filter on but I can't seem to find the right syntax to get it done. I have tried a few things and had no success. Any help would be greatly appreciated, thanks in advance. xl is excel.application wb is workbook 1) xl.ActiveWindow.AutoFilter = True 2) xl.AutoFilter = True 3) wb.ActiveSheet.Range("A2").Select.AutoFilter = True

VB problem...

Postby Debbie » Sun, 05 Oct 2003 06:38:49 GMT

Coding having problem with...

Private Sub txtSearch_AfterUpdate()
    'Find the record that matches the control.
    Me.RecordsetClone.FindFirst "[ProvID] = '" & Me!
[txtSearch] & "'"
    Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub

Problem...
Coding above is supposed to pull up a search in an unbound 
text field.  It works find for a couple of times, but if 
you try the search again, it comes up with an Action 
Failed Window...  saying

Macro Name:
cmdSAVE:Updated
Condition:
True
Action Name:
Set Value
Arguments:
[Forms]![frmMainScreen]![Date], Now()



Re: VB problem...

Postby Ken Snell » Sun, 05 Oct 2003 08:52:19 GMT

I'm guessing that the times it is not working, there is no match found. Try
changing your code to this:

Private Sub txtSearch_AfterUpdate()
    'Find the record that matches the control.
    Me.RecordsetClone.FindFirst "[ProvID] = '" & Me!
[txtSearch] & "'"
    If Me.RecordsetClone.NoMatch = False Then _
        Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
-- 
       Ken Snell
<MS ACCESS MVP>








Re: VB problem...

Postby Bruce M. Thompson » Sun, 05 Oct 2003 09:50:23 GMT

> Problem...

From which event is the above-named macro called? It appears to be trying to set
the value of a date field while you are trying to move to another record.

-- 
Bruce M. Thompson
 XXXX@XXXXX.COM  (See the Access FAQ at  http://www.**--****.com/ )
     within the newsgroups so that all might benefit.<<



Re: VB problem...

Postby Ken Snell » Fri, 10 Oct 2003 10:10:18 GMT

Bruce -

Good eyes.... I missed the SetValue note in the original post!

-- 
       Ken Snell
<MS ACCESS MVP>





to set



Re: VB problem...

Postby Bruce M. Thompson » Sat, 11 Oct 2003 01:04:42 GMT

> Good eyes.... I missed the SetValue note in the original post!

That's okay, Ken. "Real" programmers never see that error message, do they?

<laugh>
-- 
Bruce M. Thompson
 XXXX@XXXXX.COM  (See the Access FAQ at  http://www.**--****.com/ )
     within the newsgroups so that all might benefit.<<



Re: VB problem...

Postby Ken Snell » Sat, 11 Oct 2003 11:25:08 GMT

< g >

-- 
       Ken Snell
<MS ACCESS MVP>





they?



Similar Threads:

1.Have VB Problem on Access Startup

These values are stored in a table? Use the DLookup function to get them for
your code:

labelversion.Caption = DLookup("Version", "tablename")
DBCS_revised.Caption = DLookup("Revised", "tablename")
DBCS_website.Caption = DLookup("Website", "tablename")

-- 

        Ken Snell
<MS ACCESS MVP>

"Larry" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
> Ok i have a table with the database version, date created, aurthor, last
date
> updated and etc. Well I have that also in a form so i can view and change
the
> info from the form instead of going into the coding each time and changing
> all the forms. My problem is every time i start access the
> form_databasecontrolstatus opens every time and i dont want it to because
i
> dont want any users to see it. In the startup form, logon, motd, and main
> menu i have labels setup to point to this form and to the correct textbox
in
> that form for example the vb code i have setup for startup is
>
> Private Sub Form_Load()
> labelversion.Caption = Form_DatabaseControlStatus.Version.Value
> DBCS_revised.Caption = Form_DatabaseControlStatus.Revised.Value
> DBCS_website.Caption = Form_DatabaseControlStatus.Website.Value
> End Sub
>
> please help


2.VB problem....

Since this auto completes, the person data entering would 
know right away if the numbers pulling are or are not 
correct.  Also, since this is still in testing phase, I 
know that the numbers I'm pulling are correct.  It's kind 
of hard to miss an ID of 1234567.  HA HA.

All I have to type is 123 and it prefills 4567 for me.

I will try your method and let you know if it works.

Thanks.

debbie =}


>-----Original Message-----
>I'm guessing that the times it is not working, there is 
no match found. Try
>changing your code to this:
>
>Private Sub txtSearch_AfterUpdate()
>    'Find the record that matches the control.
>    Me.RecordsetClone.FindFirst "[ProvID] = '" & Me!
>[txtSearch] & "'"
>    If Me.RecordsetClone.NoMatch = False Then _
>        Me.Bookmark = Me.RecordsetClone.Bookmark
>End Sub
>-- 
>       Ken Snell
><MS ACCESS MVP>
>
>"Debbie" < XXXX@XXXXX.COM > wrote in message
>news:1f84301c389f6$bb8f32b0$ XXXX@XXXXX.COM ...
>> Coding having problem with...
>>
>> Private Sub txtSearch_AfterUpdate()
>>     'Find the record that matches the control.
>>     Me.RecordsetClone.FindFirst "[ProvID] = '" & Me!
>> [txtSearch] & "'"
>>     Me.Bookmark = Me.RecordsetClone.Bookmark
>> End Sub
>>
>> Problem...
>> Coding above is supposed to pull up a search in an 
unbound
>> text field.  It works find for a couple of times, but if
>> you try the search again, it comes up with an Action
>> Failed Window...  saying
>>
>> Macro Name:
>> cmdSAVE:Updated
>> Condition:
>> True
>> Action Name:
>> Set Value
>> Arguments:
>> [Forms]![frmMainScreen]![Date], Now()
>>
>>
>
>
>.
>

3.VB problem with copied form

Hi, I am using Access 2002 and I copied one of my forms, 
changed the buttons and code, and saved.  

Now the original form uses the code from the second, 
copied form.  I can tell because I am still working on the 
code for the second form and an error brings up the code. 
However, when I go into design view and look at the code, 
the old code is still there.  

When I replace the code through the error screen with the 
old code, it switches the whole preocess arround; now my 
new copy uses the code from the original.  Could anyone 
help with this?

Jessica Wunsch
AU Counseling Center Graduate Student for Web and Database

4.vb problem

hi all
this is my question
in Visual Basic 6 i have created a project that takes data from a MS access 
Data base.
my data base has a table that contains a table with tree fields.
id,name,comments
now in the VB i have a form with a text field that takes  the data from the 
field "comments" from access and display them in the text box.
the problem is that if  the field's content in comments field  is too 
long,in the VB text box , the data appears in "one line" and not in the frame 
of the text box...
i dont know if this is understendable but i need a help on that..

many thanks..
  

5.VB problem in Access 2007

Hello everyone

Lately I'm having a little problem with the VB in my forms...
When I start the mdb file, made in Access 2003 or 2000 can't recall, it 
doesn't load the VB code behind the forms.
I've got to punch F11 and then quit, for it to load the VB, otherwise I get 
an error message:

"The expression On Click you entered as the event property setting produced 
the following error: Object or class does not support the set of events."

The help on this error: 
"This error occurs when an event has failed to run because Microsoft Office 
Access cannot evaluate the location of the logic for the event. For example, 
if the OnOpen property of a form is set to =[Field], this error occurs 
because Access expects a macro or event name to run when the event is fired."

Can someone help please??????

Thanks in advanced...

6. SQL and Access VB Problem

7. Access 2003 Report & VB Problem

8. pass thru query & VB problem



Return to MS Office Access

 

Who is online

Users browsing this forum: No registered users and 36 guest