Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 13th, 2010, 01:30 PM
Registered User
 
Join Date: Feb 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Conflicting VBA open function

hi i have a system that is for booking rooms, as i have to split the system for 4 ict rooms, has created the problem. Yet getting rid of these other rooms would not do.

Option Compare Database


Public Function fnbooking()
Forms!frm_roombookingsWICT2.cboDay2.SetFocus
fnbooking = Forms!frm_roombookingsWICT2.cboDay2
End Function
Public Function fnteachers()
Forms!frm_roombookingsWICT2.txtTeachersInitials.Se tFocus
fnteachers = Forms!frm_roombookingsWICT2.txtTeachersInitials
End Function
Public Function fnbooking2()
Forms!frm_roombookingsWICT1.cboDay.SetFocus
fnbooking2 = Forms!frm_roombookingsWICT1.cboDay
End Function

this is the function i am using to define information that is shown in another combo box by the first one setting the paramaters. yet with this it comes up with a problem, when i run this from the wict1 form it highlights a error and needs to be debugs and says Forms!frm_roombookingsWICT2.cboDay2.SetFocus is the problem yet when i run wict2 form with out wict1 there is no problems please help me :(
Reply With Quote
  #2 (permalink)  
Old March 3rd, 2010, 08:37 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

These functions refer to 2 forms (WICT1 and WICT2). Are both forms open at the time these functions are run? If they are not both open, this will cause an error.
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote
  #3 (permalink)  
Old March 3rd, 2010, 04:27 PM
Registered User
 
Join Date: Feb 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ive solved it

Public Function fnbooking()
Forms!frm_roombookingsWICT2.cboDay2.SetFocus
fnbooking = Forms!frm_roombookingsWICT2.cboDay2
End Function

Public Function fnbooking2()
Forms!frm_roombookingsWICT1.cboDay.SetFocus
fnbooking2 = Forms!frm_roombookingsWICT1.cboDay
End Function

i know it may look the same its the fact that it wasnt the same in my database for some reason it was missing fnbookings2 on the 3rd line of the second line and now works and my system is now finished :D and allows me to book ict rooms effortlessly if you need help on bookin rooms just ask
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't open database thru VBA sektor Access VBA 1 September 15th, 2008 11:44 AM
how to open an existing query in VBA michael193nj Access VBA 4 March 26th, 2008 05:09 PM
Conflicting Libraries in VBA References echovue Access VBA 1 July 11th, 2006 10:56 AM
Access VBA - Open a different form... jonwitts Access VBA 3 April 27th, 2005 06:47 AM
compacting an open mdb using VBA Dwight Pro VB 6 5 July 7th, 2004 01:53 PM



All times are GMT -4. The time now is 10:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.