File to save farm name is not exclusive to db file

B

Blair

I have 2 farms so I have 2 copies of the db in two different directies, but
when I put the farm name in one db it changes the name of the other so both
db's are using the same farm name file. I have included the way I managed to
save the farm name below. Does anyone have a suggestion on how I can isolate
each file.

Thanks Blair


Option Compare Database
Option Explicit
Public FarmName As String




Private Sub Form_Load()

Open "Farm Name" For Random As #1 Len = 50
Get #1, 1, FarmName
Close #1
Text1 = FarmName

End Sub



Private Sub Text1_AfterUpdate()
FarmName = Text1
Open "Farm Name" For Random As #1 Len = 50


Put #1, 1, FarmName

Close #1 ' Close file.

End Sub
 
D

Damian S

Hi Blair,

How about having a table eg: tblFarmDetails with a field in it called
FarmName, which you can then lookup in your queries etc when needed.

Damian.
 
B

Blair

Thanks for the suggestion
Blair
Damian S said:
Hi Blair,

How about having a table eg: tblFarmDetails with a field in it called
FarmName, which you can then lookup in your queries etc when needed.

Damian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top